summaryrefslogtreecommitdiff
path: root/drivers/windows/tcp_server_winsock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/windows/tcp_server_winsock.cpp')
-rw-r--r--drivers/windows/tcp_server_winsock.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/windows/tcp_server_winsock.cpp b/drivers/windows/tcp_server_winsock.cpp
index 413a0d19b5..ddb955549f 100644
--- a/drivers/windows/tcp_server_winsock.cpp
+++ b/drivers/windows/tcp_server_winsock.cpp
@@ -105,6 +105,7 @@ Error TCPServerWinsock::listen(uint16_t p_port, const IP_Address &p_bind_address
ERR_FAIL_V(FAILED);
};
} else {
+ closesocket(sockfd);
return ERR_ALREADY_IN_USE;
};