mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Close the socket in shutdown_networking()
This commit is contained in:
parent
92398844a0
commit
37a300f902
|
@ -166,7 +166,10 @@ int init_networking(IP ip ,uint16_t port)
|
||||||
void shutdown_networking()
|
void shutdown_networking()
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
closesocket(sock);
|
||||||
WSACleanup();
|
WSACleanup();
|
||||||
|
#else
|
||||||
|
close(sock);
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,6 +52,7 @@
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user