Skip to content
Snippets Groups Projects
Verified Commit 87367935 authored by Burak Hançerli's avatar Burak Hançerli :headphones:
Browse files

fix: abort the connection in case of ping is not received

parent 6d5a1ca4
No related branches found
No related tags found
1 merge request!61Popup for showing the current operation and new app icon
Pipeline #77248 passed
...@@ -15,7 +15,6 @@ DesignStudio::DesignStudio(QWebSocket *socket, const QString &m_deviceUuid, QObj ...@@ -15,7 +15,6 @@ DesignStudio::DesignStudio(QWebSocket *socket, const QString &m_deviceUuid, QObj
initPingPong(); initPingPong();
initSocket(); initSocket();
qDebug() << "Starting ping timer" << m_id;
m_pingTimer.start(); m_pingTimer.start();
} }
...@@ -42,6 +41,8 @@ void DesignStudio::initPingPong() ...@@ -42,6 +41,8 @@ void DesignStudio::initPingPong()
connect(&m_pongTimer, &QTimer::timeout, this, [this]() { connect(&m_pongTimer, &QTimer::timeout, this, [this]() {
qDebug() << "Design Studio" << m_id << "is not responding. Closing the connection."; qDebug() << "Design Studio" << m_id << "is not responding. Closing the connection.";
m_socket->close(); m_socket->close();
m_socket->abort();
emit disconnected(m_id);
}); });
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment