mirror of
https://github.com/eclipse/paho.mqtt-sn.embedded-c.git
synced 2025-12-16 08:56:51 +01:00
BugFix: Exclusive control the close of TCPIP
This commit is contained in:
@@ -57,6 +57,7 @@ bool TCPStack::isValid()
|
||||
|
||||
void TCPStack::close()
|
||||
{
|
||||
_mutex.lock();
|
||||
if (_sockfd > 0)
|
||||
{
|
||||
::close(_sockfd);
|
||||
@@ -67,6 +68,7 @@ void TCPStack::close()
|
||||
_addrinfo = 0;
|
||||
}
|
||||
}
|
||||
_mutex.unlock();
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user