From 37a300f9021cbf8c5e6e1134ae8eee9c33307eb7 Mon Sep 17 00:00:00 2001 From: Astonex Date: Sat, 27 Jul 2013 02:45:58 +0100 Subject: [PATCH] Close the socket in shutdown_networking() --- core/network.c | 3 +++ core/network.h | 1 + 2 files changed, 4 insertions(+) diff --git a/core/network.c b/core/network.c index bc6738ac..d4e25c82 100644 --- a/core/network.c +++ b/core/network.c @@ -166,7 +166,10 @@ int init_networking(IP ip ,uint16_t port) void shutdown_networking() { #ifdef WIN32 + closesocket(sock); WSACleanup(); + #else + close(sock); #endif return; } diff --git a/core/network.h b/core/network.h index 62169d88..3b999cec 100644 --- a/core/network.h +++ b/core/network.h @@ -52,6 +52,7 @@ #include #include #include +#include #endif