Skip to content

Commit

Permalink
Dispatcher: May be fixed a first-auth issue with extra connections
Browse files Browse the repository at this point in the history
Somewhy on a new session extra connection to the main dc has no proper
auth key, which leads to AuthExport/AuthImport, which fails because
we can not export auth to the same DC, which process the request.
  • Loading branch information
Kaffeine committed Sep 13, 2016
1 parent aa7169e commit e7047b0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions telegram-qt/CTelegramDispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2758,6 +2758,13 @@ void CTelegramDispatcher::ensureSignedConnection(CTelegramConnection *connection
return;
}

if (activeConnection()->dcInfo().id == dc) {
connection->setDeltaTime(activeConnection()->deltaTime());
connection->setAuthKey(activeConnection()->authKey());
connection->setServerSalt(activeConnection()->serverSalt());
return;
}

if (m_exportedAuthentications.contains(dc)) {
connection->authImportAuthorization(m_exportedAuthentications.value(dc).first, m_exportedAuthentications.value(dc).second);
} else {
Expand Down

0 comments on commit e7047b0

Please sign in to comment.