Log socket errors

Do not silently ignore close() and shutdown() errors, and use perror()
to get the errno.
This commit is contained in:
Romain Vimont
2018-02-16 14:55:33 +01:00
parent 37af0c8076
commit 6db22ef339
5 changed files with 26 additions and 14 deletions

View File

@@ -11,6 +11,6 @@ void net_cleanup(void) {
// do nothing
}
void net_close(socket_t socket) {
close(socket);
SDL_bool net_close(socket_t socket) {
return !close(socket);
}