mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Merge pull request #115 from Astonex/master
Close the socket in shutdown_networking()
This commit is contained in:
commit
45b5ef0b79
|
@ -159,7 +159,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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,6 +48,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