mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
Log socket errors
Do not silently ignore close() and shutdown() errors, and use perror() to get the errno.
This commit is contained in:
parent
37af0c8076
commit
6db22ef339
5 changed files with 26 additions and 14 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue