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 ) {