Close socket at the earliest.

This commit is contained in:
Érico Nogueira 2021-07-20 01:25:18 -03:00
parent 79787eeaab
commit 88234ad8fc
1 changed files with 1 additions and 0 deletions

View File

@ -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;