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

fix: speed tracker still runs and popup is left open after the disconnection

parent 636e9043
No related branches found
No related tags found
1 merge request!74fix: speed tracker still runs and popup is left open after the disconnection
Pipeline #79035 passed
...@@ -83,6 +83,7 @@ Backend::Backend(QObject *parent) ...@@ -83,6 +83,7 @@ Backend::Backend(QObject *parent)
if (m_projectManager && !m_projectManager->sessionId().isEmpty()) if (m_projectManager && !m_projectManager->sessionId().isEmpty())
QMetaObject::invokeMethod(m_projectManager.get(), "stopProject"); QMetaObject::invokeMethod(m_projectManager.get(), "stopProject");
m_dsManager->disconnectAllDesignStudios(); m_dsManager->disconnectAllDesignStudios();
popupClose();
} }
}); });
......
...@@ -38,7 +38,6 @@ DesignStudio::DesignStudio(QWebSocket *socket, const QString &deviceID, QObject ...@@ -38,7 +38,6 @@ DesignStudio::DesignStudio(QWebSocket *socket, const QString &deviceID, QObject
qDebug() << "Project is stalled. Closing the connection."; qDebug() << "Project is stalled. Closing the connection.";
m_socket->close(); m_socket->close();
m_socket->abort(); m_socket->abort();
emit disconnected(m_designStudioID);
}); });
m_speedCalculator.setInterval(1000); m_speedCalculator.setInterval(1000);
...@@ -82,7 +81,6 @@ void DesignStudio::initPingPong() ...@@ -82,7 +81,6 @@ void DesignStudio::initPingPong()
<< "is not responding. Closing the connection."; << "is not responding. Closing the connection.";
m_socket->close(); m_socket->close();
m_socket->abort(); m_socket->abort();
emit disconnected(m_designStudioID);
}); });
} }
...@@ -103,6 +101,9 @@ void DesignStudio::initSocket() ...@@ -103,6 +101,9 @@ void DesignStudio::initSocket()
qDebug() << "Design Studio" << m_designStudioID << "disconnected"; qDebug() << "Design Studio" << m_designStudioID << "disconnected";
m_pingTimer.stop(); m_pingTimer.stop();
m_pongTimer.stop(); m_pongTimer.stop();
m_projectStallTimer.stop();
m_speedCalculator.stop();
m_projectData.clear();
emit disconnected(m_designStudioID); emit disconnected(m_designStudioID);
}); });
......
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