mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 08:37:03 +08:00
[AFV] Ref T730, added graceful shutdown in AFV client itself
Also disconnect from network during "shutdown"
This commit is contained in:
@@ -220,6 +220,7 @@ namespace BlackCore
|
||||
m_startDateTimeUtc = QDateTime::currentDateTimeUtc();
|
||||
m_connection->setReceiveAudio(true);
|
||||
m_voiceServerPositionTimer->start(PositionUpdatesMs);
|
||||
|
||||
this->onSettingsChanged(); // make sure all settings are applied
|
||||
m_isStarted = true;
|
||||
CLogMessage(this).info(u"Started [Input: %1] [Output: %2]") << inputDevice.getName() << outputDevice.getName();
|
||||
@@ -672,6 +673,14 @@ namespace BlackCore
|
||||
return m_connection->updateVoiceServerUrl(url);
|
||||
}
|
||||
|
||||
void CAfvClient::gracefulShutdown()
|
||||
{
|
||||
this->stopAudio();
|
||||
this->disconnectFrom();
|
||||
this->quitAndWait();
|
||||
Q_ASSERT_X(CThreadUtils::isCurrentThreadObjectThread(this), Q_FUNC_INFO, "Needs to be back in current thread");
|
||||
}
|
||||
|
||||
void CAfvClient::initialize()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
|
||||
Reference in New Issue
Block a user