[polari/wip/fmuellner/3-24-1-candidates: 5/10] serverRoomManager: Handle room list initialization errors
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/fmuellner/3-24-1-candidates: 5/10] serverRoomManager: Handle room list initialization errors
- Date: Sun, 9 Apr 2017 20:07:28 +0000 (UTC)
commit c6b4a86b5bd0901b8ba195e0422c69c286da73ad
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Mar 23 23:31:12 2017 +0100
serverRoomManager: Handle room list initialization errors
Currently when an error occurs during room list initialization, the
list for the account in question won't be available until polari is
restarted. Instead, handle errors so that we can retry the next time
the account gets connected.
https://bugzilla.gnome.org/show_bug.cgi?id=781072
src/serverRoomManager.js | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/serverRoomManager.js b/src/serverRoomManager.js
index fd9b841..9c60f72 100644
--- a/src/serverRoomManager.js
+++ b/src/serverRoomManager.js
@@ -65,7 +65,12 @@ const _ServerRoomManager = new Lang.Class({
let roomList = new Tp.RoomList({ account: account });
roomList.init_async(GLib.PRIORITY_DEFAULT, null, (o, res) => {
- roomList.init_finish(res);
+ try {
+ roomList.init_finish(res);
+ } catch(e) {
+ this._roomLists.delete(account);
+ return;
+ }
roomList.start();
});
roomList.connect('got-room', Lang.bind(this, this._onGotRoom));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]