mirror of https://github.com/ericonr/dnsquery.git
Close socket at the earliest.
This commit is contained in:
parent
79787eeaab
commit
88234ad8fc
|
@ -104,6 +104,7 @@ int main()
|
|||
sendto(s, q, i, 0, ap, sizeof addr);
|
||||
|
||||
ssize_t ret = recv(s, r, sizeof r, 0);
|
||||
close(s);
|
||||
if (ret < 0) {
|
||||
perror("recv");
|
||||
return 1;
|
||||
|
|
Loading…
Reference in New Issue