diff options
author | Astonex <softukitu@gmail.com> | 2013-07-27 02:45:58 +0100 |
---|---|---|
committer | Astonex <softukitu@gmail.com> | 2013-07-27 02:45:58 +0100 |
commit | 37a300f9021cbf8c5e6e1134ae8eee9c33307eb7 (patch) | |
tree | 64648fd4154b175a2be9b8b0aab6bb617a1658c6 /core/network.c | |
parent | 92398844a05bf5f0ce4333e0d4bd03c6e6633f77 (diff) |
Close the socket in shutdown_networking()
Diffstat (limited to 'core/network.c')
-rw-r--r-- | core/network.c | 3 |
1 files changed, 3 insertions, 0 deletions
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) | |||
166 | void shutdown_networking() | 166 | void shutdown_networking() |
167 | { | 167 | { |
168 | #ifdef WIN32 | 168 | #ifdef WIN32 |
169 | closesocket(sock); | ||
169 | WSACleanup(); | 170 | WSACleanup(); |
171 | #else | ||
172 | close(sock); | ||
170 | #endif | 173 | #endif |
171 | return; | 174 | return; |
172 | } | 175 | } |