summaryrefslogtreecommitdiffstats
path: root/drivers/unix/stream_peer_tcp_posix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/unix/stream_peer_tcp_posix.cpp')
-rw-r--r--drivers/unix/stream_peer_tcp_posix.cpp7
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;