socketno : integer;\r
begin\r
for socketno := 0 to numsock -1 do begin\r
- if dnsserverids[socketno] >= 0 then begin\r
- reportlag(dnsserverids[socketno],-1);\r
- dnsserverids[socketno] := -1;\r
- end;\r
- sockets[socketno].release;\r
- setstate_request_init('',states[socketno]);\r
+ if assigned(sockets[socketno]) then begin
+ if dnsserverids[socketno] >= 0 then begin\r
+ reportlag(dnsserverids[socketno],-1);\r
+ dnsserverids[socketno] := -1;\r
+ end;\r
+ sockets[socketno].release;\r
+ setstate_request_init('',states[socketno]);\r
+ end;
end;\r
inherited destroy;\r
end;\r