X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/250fdcdbf77f0296f31391eb3a8b87de195aad92..096e05689a95dc55ef9f554978c5ea3f263bc919:/dnssync.pas diff --git a/dnssync.pas b/dnssync.pas index 1a506d5..9a0c2c1 100644 --- a/dnssync.pas +++ b/dnssync.pas @@ -140,7 +140,11 @@ var begin //init both sockets smultaneously, always, so they get succesive fd's - if fd[0] > 0 then exit; + + {recreate sockets every time, reusing them will fail (hang) if the nameserver is changed + also changing the nameserver can't possibly work} + {if fd[0] > 0 then exit;} + for a := 0 to numsock-1 do if (fd[a] > 0) then closesocket(fd[a]); biniptemp := getcurrentsystemnameserverbin(id); //must get the DNS server here so we know to init v4 or v6