From 5812571df41c7def07f285726e8610446cf58e8b Mon Sep 17 00:00:00 2001 From: curt Date: Thu, 27 Nov 2003 13:24:26 +0000 Subject: [PATCH] Attempt to fix a bug in SGSocket::read() affecting TCP style sockets. --- simgear/io/sg_socket.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 ) { -- 2.39.5