Skip to content

Commit

Permalink
(Network) Check connect errno for successful connection
Browse files Browse the repository at this point in the history
  • Loading branch information
MrHuu committed Sep 16, 2022
1 parent 83ce6f4 commit 04a172b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libretro-common/net/net_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,9 @@ bool socket_connect_with_timeout(int fd, void *data, int timeout)
if (error)
return false;
}
#else
if (connect(fd, addr->ai_addr, addr->ai_addrlen) < 0 && errno != EISCONN)
return false;
#endif

return true;
Expand Down

0 comments on commit 04a172b

Please sign in to comment.