close modem socket after joining read thread
This commit is contained in:
parent
9d0d2f0a40
commit
7775ea325f
|
@ -130,15 +130,15 @@ bool TAPServerConnection::Activate()
|
||||||
|
|
||||||
void TAPServerConnection::Deactivate()
|
void TAPServerConnection::Deactivate()
|
||||||
{
|
{
|
||||||
if (m_fd >= 0)
|
|
||||||
closesocket(m_fd);
|
|
||||||
m_fd = -1;
|
|
||||||
|
|
||||||
m_read_enabled.Clear();
|
m_read_enabled.Clear();
|
||||||
m_read_shutdown.Set();
|
m_read_shutdown.Set();
|
||||||
if (m_read_thread.joinable())
|
if (m_read_thread.joinable())
|
||||||
m_read_thread.join();
|
m_read_thread.join();
|
||||||
m_read_shutdown.Clear();
|
m_read_shutdown.Clear();
|
||||||
|
|
||||||
|
if (m_fd >= 0)
|
||||||
|
closesocket(m_fd);
|
||||||
|
m_fd = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TAPServerConnection::IsActivated()
|
bool TAPServerConnection::IsActivated()
|
||||||
|
|
Loading…
Reference in New Issue