Implemented correct windows socket cleanup

Resolves HerculesWS/Hercules#1513
Thanks to @mkbu95 for bringing this up
This commit is contained in:
Lemongrass3110 2016-11-14 10:44:43 +01:00
parent 4ed035b036
commit b5de7df013

View File

@ -1218,6 +1218,13 @@ void socket_final(void)
aFree(session[0]->session_data);
aFree(session[0]);
session[0] = NULL;
#ifdef WIN32
// Shut down windows networking
if( WSACleanup() != 0 ){
ShowError("socket_final: WinSock could not be cleaned up! %s\n", error_msg() );
}
#endif
}
/// Closes a socket.