From: curt Date: Thu, 27 Nov 2003 13:24:26 +0000 (+0000) Subject: Attempt to fix a bug in SGSocket::read() affecting TCP style sockets. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5812571df41c7def07f285726e8610446cf58e8b;p=simgear.git Attempt to fix a bug in SGSocket::read() affecting TCP style sockets. --- diff --git a/simgear/io/sg_socket.cxx b/simgear/io/sg_socket.cxx index 0ac45a80..4ee0eba2 100644 --- a/simgear/io/sg_socket.cxx +++ b/simgear/io/sg_socket.cxx @@ -218,7 +218,14 @@ SGSocket::read( char *buf, int length ) if (result > 0) { - result = sock.recv( buf, length ); + if (is_tcp) + { + result = client->recv( buf, length ); + } + else + { + result = sock.recv( buf, length ); + } if ( result != length ) {