summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorreduz <reduzio@gmail.com>2014-06-11 01:14:32 -0300
committerreduz <reduzio@gmail.com>2014-06-11 01:14:32 -0300
commit267ab88c68d75dfb5fa8eb53137369df2907a85a (patch)
treee160a4257d6a6d26cfda9a39aa034be6cf3a2e6e /platform
parentade32e5e904979965e15d810d80d1d93d3a15460 (diff)
parent91aa645d8a6d3dfa4e92a7de37a6bee5b8c3b31a (diff)
Merge pull request #475 from TheoXD/master
Return an error code when address/port already in use
Diffstat (limited to 'platform')
-rw-r--r--platform/windows/tcp_server_winsock.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/platform/windows/tcp_server_winsock.cpp b/platform/windows/tcp_server_winsock.cpp
index 7b35bcc7ad..e77ca6feaa 100644
--- a/platform/windows/tcp_server_winsock.cpp
+++ b/platform/windows/tcp_server_winsock.cpp
@@ -86,6 +86,9 @@ Error TCPServerWinsock::listen(uint16_t p_port,const List<String> *p_accepted_ho
closesocket(sockfd);
ERR_FAIL_V(FAILED);
};
+ }
+ else {
+ return ERR_ALREADY_IN_USE;
};
if (listen_sockfd != INVALID_SOCKET) {