lcore.org gitweb
/
lcore.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added unixutil to lmessages because of unixstuff.inc compile error
[lcore.git]
/
lsocket.pas
diff --git
a/lsocket.pas
b/lsocket.pas
index ffd411f6b743ed99cb8fc5b3149d13d0c7a903e2..898e983b66483974597b07b7fa47c9aa25a4f7f0 100755
(executable)
--- a/
lsocket.pas
+++ b/
lsocket.pas
@@
-56,7
+56,6
@@
interface
classes,{pgdebugout,}pgtypes,lcore,fd_utils,binipstuff,dnssync;
\r
\r
{$ifdef ipv6}
\r
classes,{pgdebugout,}pgtypes,lcore,fd_utils,binipstuff,dnssync;
\r
\r
{$ifdef ipv6}
\r
-{$define secondlistener}
\r
const
\r
v4listendefault:boolean=false;
\r
{$endif}
\r
const
\r
v4listendefault:boolean=false;
\r
{$endif}
\r
@@
-143,8
+142,6
@@
type
twsocket=tlsocket; {easy}
\r
\r
\r
twsocket=tlsocket; {easy}
\r
\r
\r
-{!!!function longipdns(s:string):longint;}
\r
-
\r
const
\r
TCP_NODELAY=1;
\r
IPPROTO_TCP=6;
\r
const
\r
TCP_NODELAY=1;
\r
IPPROTO_TCP=6;
\r
@@
-385,7
+382,12
@@
begin
end else begin
\r
secondlistener.onsessionAvailable := secondaccepthandler;
\r
end;
\r
end else begin
\r
secondlistener.onsessionAvailable := secondaccepthandler;
\r
end;
\r
- secondlistener.listen;
\r
+ try
\r
+ secondlistener.listen;
\r
+ except
\r
+ secondlistener.destroy;
\r
+ secondlistener := nil;
\r
+ end;
\r
end;
\r
{$endif}
\r
finally
\r
end;
\r
{$endif}
\r
finally
\r
@@
-408,7
+410,10
@@
end;
{$ifdef secondlistener}
\r
procedure tlsocket.internalclose(error:word);
\r
begin
\r
{$ifdef secondlistener}
\r
procedure tlsocket.internalclose(error:word);
\r
begin
\r
- if assigned(secondlistener) then secondlistener.destroy;
\r
+ if assigned(secondlistener) then begin
\r
+ secondlistener.destroy;
\r
+ secondlistener := nil;
\r
+ end;
\r
inherited internalclose(error);
\r
end;
\r
\r
inherited internalclose(error);
\r
end;
\r
\r
@@
-699,6
+704,6
@@
end;
result := winsock.recv(fd,buf,size,0);
\r
end;
\r
{$endif}
\r
result := winsock.recv(fd,buf,size,0);
\r
end;
\r
{$endif}
\r
-
+
\r
end.
\r
\r
end.
\r
\r