mirror of
https://github.com/modelec/TCPSocketClient.git
synced 2026-01-18 16:37:35 +01:00
do not close if already closed :)
This commit is contained in:
@@ -77,8 +77,10 @@ void TCPClient::start() {
|
||||
}
|
||||
|
||||
void TCPClient::stop() {
|
||||
running = false;
|
||||
close(clientSocket);
|
||||
if (running) {
|
||||
running = false;
|
||||
close(clientSocket);
|
||||
}
|
||||
}
|
||||
|
||||
bool TCPClient::shouldStop() const {
|
||||
|
||||
Reference in New Issue
Block a user