hopefully fix a connection death bug that was annoying zipplet
[lcore.git] / lcore.pas
index 99e633974383a075aa99c86854c3d6cb6b365bba..77bf4f0674db0b63eebc8df4346c44fb19c7be60 100755 (executable)
--- a/lcore.pas
+++ b/lcore.pas
@@ -573,7 +573,16 @@ begin
           internalclose(0);\r
 \r
         end else begin\r
           internalclose(0);\r
 \r
         end else begin\r
-          internalclose({$ifdef win32}getlasterror{$else}linuxerror{$endif});\r
+          {$ifdef win32}
+          if getlasterror=WSAEWOULDBLOCK then begin
+            //the asynchronous nature of windows messages means we sometimes
+            //get here with the buffer full
+            //so do nothing in that case
+          end else
+          {$endif}
+          begin
+            internalclose({$ifdef win32}getlasterror{$else}linuxerror{$endif});\r
+          end  
         end;\r
       end;\r
 \r
         end;\r
       end;\r
 \r