summaryrefslogtreecommitdiff
path: root/drivers
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 /drivers
parentade32e5e904979965e15d810d80d1d93d3a15460 (diff)
parent91aa645d8a6d3dfa4e92a7de37a6bee5b8c3b31a (diff)
Merge pull request #475 from TheoXD/master
Return an error code when address/port already in use
Diffstat (limited to 'drivers')
-rw-r--r--drivers/unix/tcp_server_posix.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/unix/tcp_server_posix.cpp b/drivers/unix/tcp_server_posix.cpp
index f91ad36ef9..dfcf479fc0 100644
--- a/drivers/unix/tcp_server_posix.cpp
+++ b/drivers/unix/tcp_server_posix.cpp
@@ -93,6 +93,9 @@ Error TCPServerPosix::listen(uint16_t p_port,const List<String> *p_accepted_host
close(sockfd);
ERR_FAIL_V(FAILED);
};
+ }
+ else {
+ return ERR_ALREADY_IN_USE;
};
if (listen_sockfd != -1) {