提交 acd2dc31 编写于 作者: R Romain Vimont

Shutdown sockets before closing

The server socket does not release the port it was listening for if we
just close it: we must also shutdown it.
上级 db396f21
......@@ -71,6 +71,7 @@ static socket_t listen_on_port(Uint16 port) {
static void close_socket(socket_t *socket) {
SDL_assert(*socket != INVALID_SOCKET);
net_shutdown(*socket, SHUT_RDWR);
if (!net_close(*socket)) {
LOGW("Cannot close socket");
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册