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

@@ -16,6 +16,6 @@ void net_cleanup(void) {
WSACleanup();
}
void net_close(socket_t socket) {
closesocket(socket);
SDL_bool net_close(socket_t socket) {
return !closesocket(socket);
}