From d43a81bae0db49655e6ffaf7a08fd823d74d86b2 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Thu, 2 Feb 2012 14:12:59 +0000 Subject: WebServer: socket fix (force-terminated socket would cause the server to loop indefinitely) git-svn-id: http://mc-server.googlecode.com/svn/trunk@226 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- WebServer/Socket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'WebServer/Socket.cpp') diff --git a/WebServer/Socket.cpp b/WebServer/Socket.cpp index 1e9af902f..1c48172ed 100644 --- a/WebServer/Socket.cpp +++ b/WebServer/Socket.cpp @@ -127,7 +127,7 @@ void Socket::Close( bool a_WaitSend /* = false */ ) { assert( shutdown(s_, SD_SEND ) == 0 ); char c; - while( recv(s_, &c, 1, 0 ) != 0 ) + while( recv(s_, &c, 1, 0 ) > 0 ) {} } -- cgit v1.2.3