Bug 842183 - Land in comm-central Instantbird's changes to chat/ - 5 - Bio 1846 - follow-up to fix reconnection timers, r=fqueze.

This commit is contained in:
aleth 2012-12-15 00:05:21 +01:00
Родитель b253010632
Коммит 073bc9e43a
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -249,6 +249,7 @@ imAccount.prototype = {
else if (aTopic == "account-disconnected") {
this.connectionState = Ci.imIAccount.STATE_DISCONNECTED;
if (this._statusObserver &&
this.prplAccount.connectionErrorReason == Ci.prplIAccount.NO_ERROR &&
this.statusInfo.statusType > Ci.imIStatusInfo.STATUS_OFFLINE) {
// If the status changed back to online while an account was still
// disconnecting, it was not reconnected automatically at that point,
@ -628,7 +629,8 @@ imAccount.prototype = {
this._cancelReconnection();
}
else if (statusType > Ci.imIStatusInfo.STATUS_OFFLINE &&
this.disconnected)
this.disconnected &&
this.connectionErrorReason == Ci.prplIAccount.NO_ERROR)
this.prplAccount.connect();
else if (this.connected)
this.prplAccount.observe(aSubject, aTopic, aData);