do SO_REUSEADDR also when listening in windows. wine needs it and it does not hurt...
[lcore.git] / lsocket.pas
index 573644b5520fedb90206ad22c10cac6103e8ccc7..6a1ce0be96b19ea5607b76cc35568de8abcd64a2 100755 (executable)
@@ -449,6 +449,9 @@ begin
           \r
         end;\r
       end;\r
+    {$else}\r
+      SetSockOpt(fdhandlein, SOL_SOCKET, SO_REUSEADDR, 'TRUE', Length('TRUE'));\r
+\r
     {$endif}\r
     localaddr := addr;\r
     localport := port;\r