const\r
receivebufsize=1460;\r
\r
+ var\r
+ absoloutemaxs:integer=0;\r
+\r
type\r
{$ifdef ver1_0}\r
sigset= array[0..31] of longint;\r
constructor tlasio.create;\r
begin\r
inherited create(AOwner);\r
+ if not assigned(eventcore) then raise exception.create('no event core');\r
sendq := tfifo.create;\r
recvq := tfifo.create;\r
state := wsclosed;\r
if nextasin <> nil then begin\r
nextasin.prevasin := prevasin;\r
end;\r
- recvq.destroy;\r
- sendq.destroy;\r
+ recvq.free;\r
+ sendq.free;\r
inherited destroy;\r
end;\r
\r
\r
procedure tlasio.internalclose(error:word);\r
begin\r
- if state<>wsclosed then begin\r
+ if (state<>wsclosed) and (state<>wsinvalidstate) then begin\r
if (fdhandlein < 0) or (fdhandleout < 0) then raise exception.create('internalclose called with invalid fd handles');\r
eventcore.rmasterclr(fdhandlein);//fd_clr(fdhandlein,fdsrmaster);\r
eventcore.wmasterclr(fdhandleout);//fd_clr(fdhandleout,fdswmaster);\r
\r
if assigned(onsessionclosed) then if not destroying then onsessionclosed(self,error);\r
end;\r
- sendq.del(maxlongint);\r
+ if assigned(sendq) then sendq.del(maxlongint);\r
end;\r
\r
\r