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()
|
||||
{
|
||||
#ifdef WIN32
|
||||
closesocket(sock);
|
||||
WSACleanup();
|
||||
#else
|
||||
close(sock);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user