Unverified Commit 57f291c4 authored by Mohsen's avatar Mohsen Committed by GitHub

close listener file descriptor

during the shutdown process, in deconstruction of listener, it should be close the fd if it already open and if it had not zero value
parent 07444f57
...@@ -95,6 +95,12 @@ Listener::~Listener() { ...@@ -95,6 +95,12 @@ Listener::~Listener() {
shutdown(); shutdown();
if (acceptThread.joinable()) if (acceptThread.joinable())
acceptThread.join(); acceptThread.join();
if (listen_fd > 0)
{
close(listen_fd);
listen_fd = 0;
}
#ifdef PISTACHE_USE_SSL #ifdef PISTACHE_USE_SSL
if (this->useSSL_) if (this->useSSL_)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment