diff options
| author | Fabio Alessandrelli | 2016-12-08 19:59:16 +0100 |
|---|---|---|
| committer | Fabio Alessandrelli | 2017-01-04 00:46:32 +0100 |
| commit | c030e602e52034a4dc9f26b76e55ecd272f4cf6f (patch) | |
| tree | 32c6cc826df9b2df212665ee89023d5cbd259119 /drivers/unix/stream_peer_tcp_posix.cpp | |
| parent | 19b31297ece194493ae0c17eba2944d5344f28e9 (diff) | |
| download | godot-c030e602e52034a4dc9f26b76e55ecd272f4cf6f.tar.gz godot-c030e602e52034a4dc9f26b76e55ecd272f4cf6f.tar.zst godot-c030e602e52034a4dc9f26b76e55ecd272f4cf6f.zip | |
Properly handle tcp connection failure
(cherry picked from commit 4f07b595a17a633c65c5df43ecdaa37667a475e9)
Diffstat (limited to 'drivers/unix/stream_peer_tcp_posix.cpp')
| -rw-r--r-- | drivers/unix/stream_peer_tcp_posix.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/unix/stream_peer_tcp_posix.cpp b/drivers/unix/stream_peer_tcp_posix.cpp index b1636abd6..19f1ed4b3 100644 --- a/drivers/unix/stream_peer_tcp_posix.cpp +++ b/drivers/unix/stream_peer_tcp_posix.cpp @@ -107,7 +107,12 @@ Error StreamPeerTCPPosix::_poll_connection(bool p_block) const { return OK; }; - return OK; + if (errno == EINPROGRESS || errno == EALREADY) { + return OK; + } + + status = STATUS_ERROR; + return ERR_CONNECTION_ERROR; } else { status = STATUS_CONNECTED; |
