From 91aa645d8a6d3dfa4e92a7de37a6bee5b8c3b31a Mon Sep 17 00:00:00 2001 From: Theo Hallenius Date: Sat, 31 May 2014 17:13:08 +0200 Subject: Return an error code when address/port already in use --- drivers/unix/tcp_server_posix.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers') 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 *p_accepted_host close(sockfd); ERR_FAIL_V(FAILED); }; + } + else { + return ERR_ALREADY_IN_USE; }; if (listen_sockfd != -1) { -- cgit v1.2.3