]> granicus.if.org Git - libevent/commitdiff
regress_clean_dnsserver(): reset global port vars
authorAzat Khuzhin <a3at.mail@gmail.com>
Tue, 22 Mar 2016 20:10:19 +0000 (23:10 +0300)
committerAzat Khuzhin <a3at.mail@gmail.com>
Wed, 23 Mar 2016 09:09:37 +0000 (12:09 +0300)
This will fix some test chains with --no-fork.

test/regress_testutils.c

index 7554a5413ff49cfe951c0c1a2717e9361d9ed054..959347ea71602d9736ee2dda3f7ba756a6c15cb7 100644 (file)
@@ -129,10 +129,14 @@ end:
 void
 regress_clean_dnsserver(void)
 {
-       if (dns_port)
+       if (dns_port) {
                evdns_close_server_port(dns_port);
-       if (dns_sock >= 0)
+               dns_port = NULL;
+       }
+       if (dns_sock >= 0) {
                evutil_closesocket(dns_sock);
+               dns_sock = -1;
+       }
 }
 
 static void strtolower(char *s)