libwhb: Add missing close() call on WHBLogUdpDeinit reset socket val

This commit is contained in:
Maschell
2022-02-15 12:40:13 +01:00
committed by fincs
parent fefde021b9
commit 58fabd79a2

View File

@@ -4,6 +4,7 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <string.h>
#include <unistd.h>
#include <whb/log.h>
#include <whb/log_udp.h>
#include <whb/libmanager.h>
@@ -50,9 +51,9 @@ WHBLogUdpInit()
BOOL
WHBLogUdpDeinit()
{
if(shutdown(sSocket, SHUT_WR) != 0) {
return FALSE;
}
shutdown(sSocket, SHUT_WR);
close(sSocket);
sSocket = -1;
return WHBRemoveLogHandler(udpLogHandler);
}