aboutsummaryrefslogtreecommitdiff
path: root/src/libui_sdl/LAN_Socket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libui_sdl/LAN_Socket.cpp')
-rw-r--r--src/libui_sdl/LAN_Socket.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/libui_sdl/LAN_Socket.cpp b/src/libui_sdl/LAN_Socket.cpp
index 9da5769..2aede4d 100644
--- a/src/libui_sdl/LAN_Socket.cpp
+++ b/src/libui_sdl/LAN_Socket.cpp
@@ -124,7 +124,17 @@ bool Init()
void DeInit()
{
- // TODO CLEANUP SHIT!!!!
+ for (int i = 0; i < (sizeof(TCPSocketList)/sizeof(TCPSocket)); i++)
+ {
+ TCPSocket* sock = &TCPSocketList[i];
+ if (sock->Backend) closesocket(sock->Backend);
+ }
+
+ for (int i = 0; i < (sizeof(UDPSocketList)/sizeof(UDPSocket)); i++)
+ {
+ UDPSocket* sock = &UDPSocketList[i];
+ if (sock->Backend) closesocket(sock->Backend);
+ }
}