mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibCore: close socket on UDPServer dtor
This commit is contained in:
parent
5ae2f6e9ec
commit
0246e2ae6c
Notes:
sideshowbarker
2024-07-19 04:08:29 +09:00
Author: https://github.com/tryfinally Commit: https://github.com/SerenityOS/serenity/commit/0246e2ae6c8 Pull-request: https://github.com/SerenityOS/serenity/pull/3045 Reviewed-by: https://github.com/elcuco
1 changed files with 2 additions and 0 deletions
|
@ -30,6 +30,7 @@
|
|||
#include <LibCore/UDPServer.h>
|
||||
#include <LibCore/UDPSocket.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifndef SOCK_NONBLOCK
|
||||
# include <sys/ioctl.h>
|
||||
|
@ -53,6 +54,7 @@ UDPServer::UDPServer(Object* parent)
|
|||
|
||||
UDPServer::~UDPServer()
|
||||
{
|
||||
::close(m_fd);
|
||||
}
|
||||
|
||||
bool UDPServer::bind(const IPv4Address& address, u16 port)
|
||||
|
|
Loading…
Reference in a new issue