From 096e05689a95dc55ef9f554978c5ea3f263bc919 Mon Sep 17 00:00:00 2001 From: beware Date: Sat, 10 Dec 2011 16:36:12 +0000 Subject: [PATCH 1/1] in dnssync, recreate sockets to fix problems when setting/changing custom nameserver git-svn-id: file:///svnroot/lcore/trunk@110 b1de8a11-f9be-4011-bde0-cc7ace90066a --- dnssync.pas | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.30.2