Skip to content

Commit

Permalink
LibCore: close socket on UDPServer dtor
Browse files Browse the repository at this point in the history
  • Loading branch information
tryfinally authored and awesomekling committed Aug 9, 2020
1 parent 5ae2f6e commit 0246e2a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Libraries/LibCore/UDPServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -53,6 +54,7 @@ UDPServer::UDPServer(Object* parent)

UDPServer::~UDPServer()
{
::close(m_fd);
}

bool UDPServer::bind(const IPv4Address& address, u16 port)
Expand Down

0 comments on commit 0246e2a

Please sign in to comment.