Commit 8a8ab6e0 authored by Thomas BOUTROUE's avatar Thomas BOUTROUE

Also call "stop" when having a socket error

parent 2c9fc33d
......@@ -224,6 +224,7 @@ bool CanDriver_cobsTcp::stop (void) {
m_cacheById.clear ();
m_idsCacheAll.clear ();
m_idsCacheLast.clear ();
qDeleteAll (m_clients);
qDeleteAll (m_cacheById);
return true;
}
......@@ -328,11 +329,12 @@ void CanDriver_cobsTcp::onClientDisconnected (void) {
}
void CanDriver_cobsTcp::onWatchdogTriggered (void) {
emit lost ();
stop ();
emit lost ();
}
void CanDriver_cobsTcp::onSocketError (void) {
stop ();
emit lost ();
}
......
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