X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/85ef2ce64f0cc31a063fccea69fdcc7281d51548..ac55319310f2e0b8ac5d848c1591b5e72d49c9b3:/dnsasync.pas?ds=inline diff --git a/dnsasync.pas b/dnsasync.pas index 8c3ce3a..fab858d 100755 --- a/dnsasync.pas +++ b/dnsasync.pas @@ -100,12 +100,14 @@ var socketno : integer; begin for socketno := 0 to numsock -1 do begin - if dnsserverids[socketno] >= 0 then begin - reportlag(dnsserverids[socketno],-1); - dnsserverids[socketno] := -1; + if assigned(sockets[socketno]) then begin + if dnsserverids[socketno] >= 0 then begin + reportlag(dnsserverids[socketno],-1); + dnsserverids[socketno] := -1; + end; + sockets[socketno].release; + setstate_request_init('',states[socketno]); end; - sockets[socketno].release; - setstate_request_init('',states[socketno]); end; inherited destroy; end;