Set status to disconnected on error due to insufficient config

This commit is contained in:
Martchus 2018-12-25 02:31:18 +01:00
parent c83df582b6
commit 67723bfa27
1 changed files with 2 additions and 0 deletions

View File

@ -206,6 +206,7 @@ void SyncthingConnection::connect()
// check configuration
if (m_apiKey.isEmpty() || m_syncthingUrl.isEmpty()) {
emit error(tr("Connection configuration is insufficient."), SyncthingErrorCategory::OverallConnection, QNetworkReply::NoError);
setStatus(SyncthingStatus::Disconnected);
return;
}
@ -378,6 +379,7 @@ void SyncthingConnection::continueReconnecting()
if (m_apiKey.isEmpty() || m_syncthingUrl.isEmpty()) {
emit error(tr("Connection configuration is insufficient."), SyncthingErrorCategory::OverallConnection, QNetworkReply::NoError);
setStatus(SyncthingStatus::Disconnected);
return;
}