diff options
author | reduz <reduzio@gmail.com> | 2014-06-11 01:14:32 -0300 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2014-06-11 01:14:32 -0300 |
commit | 267ab88c68d75dfb5fa8eb53137369df2907a85a (patch) | |
tree | e160a4257d6a6d26cfda9a39aa034be6cf3a2e6e /drivers | |
parent | ade32e5e904979965e15d810d80d1d93d3a15460 (diff) | |
parent | 91aa645d8a6d3dfa4e92a7de37a6bee5b8c3b31a (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.cpp | 3 |
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) { |