From 36b0d47f5f113462d853ec4af279a7711ff52454 Mon Sep 17 00:00:00 2001 From: SNMetamorph <25657591+SNMetamorph@users.noreply.github.com> Date: Sun, 10 Jul 2022 02:23:24 +0400 Subject: [PATCH] engine: common: net_ws: fixed sockets reinitialization in NET_OpenIP --- engine/common/net_ws.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/common/net_ws.c b/engine/common/net_ws.c index 675ffab0..2dfcea62 100644 --- a/engine/common/net_ws.c +++ b/engine/common/net_ws.c @@ -1484,7 +1484,7 @@ static void NET_OpenIP( qboolean change_port ) if( NET_IsSocketValid( net.ip_sockets[NS_SERVER] )) closesocket( net.ip_sockets[NS_SERVER] ); - net.ip_sockets[NS_SERVER] = 0; + net.ip_sockets[NS_SERVER] = INVALID_SOCKET; ClearBits( net_hostport->flags, FCVAR_CHANGED ); } @@ -1516,7 +1516,7 @@ static void NET_OpenIP( qboolean change_port ) if( NET_IsSocketValid(net.ip_sockets[NS_CLIENT] )) closesocket( net.ip_sockets[NS_CLIENT] ); - net.ip_sockets[NS_CLIENT] = 0; + net.ip_sockets[NS_CLIENT] = INVALID_SOCKET; ClearBits( net_clientport->flags, FCVAR_CHANGED ); }