fix invalid socket log spam
authorTaylor Richards <taylor@icculus.org>
Wed, 7 Mar 2018 18:37:04 +0000 (13:37 -0500)
committerTaylor Richards <taylor@icculus.org>
Wed, 7 Mar 2018 18:37:04 +0000 (13:37 -0500)
src/network/psnet2.cpp

index bb72397..6feb17d 100644 (file)
@@ -1039,6 +1039,10 @@ void psnet_rel_close_socket( PSNET_SOCKET_RELIABLE *sockp )
 {
        reliable_header diss_conn_header;
 
+       if (*sockp == INVALID_SOCKET) {
+               return;
+       }
+
        // if the socket is out of range
        if(*sockp>=MAXRELIABLESOCKETS)
        {