remove executable property
[lcore.git] / dnsasync.pas
old mode 100755 (executable)
new mode 100644 (file)
index 8c3ce3a..fab858d
@@ -100,12 +100,14 @@ var
   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
+    if assigned(sockets[socketno]) then 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
     end;\r
-    sockets[socketno].release;\r
-    setstate_request_init('',states[socketno]);\r
   end;\r
   inherited destroy;\r
 end;\r