From 9777e2483955343fea879378221d10f738f43b40 Mon Sep 17 00:00:00 2001
From: plugwash <plugwash@p10link.net>
Date: Fri, 23 Jan 2009 18:23:37 +0000
Subject: [PATCH 1/1] hopefully fix a connection death bug that was annoying
 zipplet

git-svn-id: file:///svnroot/lcore/trunk@27 b1de8a11-f9be-4011-bde0-cc7ace90066a
---
 lcore.pas | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/lcore.pas b/lcore.pas
index 99e6339..77bf4f0 100755
--- a/lcore.pas
+++ b/lcore.pas
@@ -573,7 +573,16 @@ begin
           internalclose(0);
 
         end else begin
-          internalclose({$ifdef win32}getlasterror{$else}linuxerror{$endif});
+          {$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});
+          end  
         end;
       end;
 
-- 
2.30.2