mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-02-10 21:01:23 +00:00
Attempt to shutdown() socket gracefully before calling close()
This commit is contained in:
parent
1a1be6ed61
commit
9b57c3d14b
@ -119,6 +119,8 @@ int overlay_mdp_client_close(int mdp_sockfd)
|
|||||||
if (unlink(addr.sun_path) == -1)
|
if (unlink(addr.sun_path) == -1)
|
||||||
WARNF_perror("unlink(%s)", alloca_str_toprint(addr.sun_path));
|
WARNF_perror("unlink(%s)", alloca_str_toprint(addr.sun_path));
|
||||||
}
|
}
|
||||||
|
/* attempt graceful socket shutdown() */
|
||||||
|
shutdown(mdp_sockfd, SHUT_RDWR);
|
||||||
close(mdp_sockfd);
|
close(mdp_sockfd);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user