lcore.org gitweb
/
lcore.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
secondlistener in lcoreconfig
[lcore.git]
/
lsocket.pas
diff --git
a/lsocket.pas
b/lsocket.pas
index ffd411f6b743ed99cb8fc5b3149d13d0c7a903e2..7438c26a00901e070a63d6925e63c2b5664d8a41 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