diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2016-12-08 19:59:16 +0100 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2016-12-09 18:24:58 +0100 |
commit | 4f07b595a17a633c65c5df43ecdaa37667a475e9 (patch) | |
tree | 9d9fc699a2f3f39cc556396620d2e70f9bee79dd /drivers/unix/stream_peer_tcp_posix.cpp | |
parent | cdc1ca0f1301bb907121292db83f98706722ff1e (diff) | |
download | redot-engine-4f07b595a17a633c65c5df43ecdaa37667a475e9.tar.gz |
Properly handle tcp connection failure
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 b1636abd69..19f1ed4b34 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; |