summaryrefslogtreecommitdiff
path: root/platform/windows
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2016-12-08 19:59:16 +0100
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2016-12-09 18:24:58 +0100
commit4f07b595a17a633c65c5df43ecdaa37667a475e9 (patch)
tree9d9fc699a2f3f39cc556396620d2e70f9bee79dd /platform/windows
parentcdc1ca0f1301bb907121292db83f98706722ff1e (diff)
Properly handle tcp connection failure
Diffstat (limited to 'platform/windows')
-rw-r--r--platform/windows/stream_peer_winsock.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/platform/windows/stream_peer_winsock.cpp b/platform/windows/stream_peer_winsock.cpp
index 44c17c73e5..48dd37e9c4 100644
--- a/platform/windows/stream_peer_winsock.cpp
+++ b/platform/windows/stream_peer_winsock.cpp
@@ -98,7 +98,12 @@ Error StreamPeerWinsock::_poll_connection(bool p_block) const {
return OK;
};
- return OK;
+ if (errno == WSAEINPROGRESS || errno == WSAEALREADY) {
+ return OK;
+ }
+
+ status = STATUS_ERROR;
+ return ERR_CONNECTION_ERROR;
} else {
status = STATUS_CONNECTED;