From 5f2c703514528039802824c6abf32bfe2204bc21 Mon Sep 17 00:00:00 2001 From: Josh Allen Date: Thu, 12 Aug 2004 19:32:39 +0000 Subject: [PATCH] Fixed a bug in pUpdateRead(). Now it can actually detect (again) if the socket was closed on the other side. --- stepmania/src/ezsockets.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stepmania/src/ezsockets.cpp b/stepmania/src/ezsockets.cpp index 6c07f6fd0e..de9a270835 100644 --- a/stepmania/src/ezsockets.cpp +++ b/stepmania/src/ezsockets.cpp @@ -368,7 +368,10 @@ int EzSockets::pUpdateRead() { if(bytes>0) inBuffer.append(tempData,bytes); - else if(bytes<0) + else if(bytes<=0) + /* To get her I think CanRead was called at least once. + So if length equals 0 and can read says there is data than + the socket was closed.*/ state = skERROR; return bytes; }