summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2012-02-13 12:13:24 +0000
committerWill Thompson <will.thompson@collabora.co.uk>2013-06-23 16:06:01 +0100
commitc53a7c69b9b6615a73a392879458f6a4314ca1a8 (patch)
tree1db56013415c62574a4c41e1773ed9e6ac102238 /plugins
parentebc3a9794c4a87092cab0a1e5f2d8c83ddafa5de (diff)
console UI: quit cleanly if connection has gone away
The console UI doesn't watch for NameOwnerChanged to notice the connection going away from beneath it. No big deal, it's a tool for nerds, but if you tried to quit it, it would not close cleanly: the call to self.snoopy.teardown() (which tries to turn off the connection dumping all stanzas over D-Bus) throws an exception, and so Gtk.main_quit() never got called.
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/telepathy-gabble-xmpp-console6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/telepathy-gabble-xmpp-console b/plugins/telepathy-gabble-xmpp-console
index 8b96469d8..731929ba1 100755
--- a/plugins/telepathy-gabble-xmpp-console
+++ b/plugins/telepathy-gabble-xmpp-console
@@ -347,7 +347,11 @@ plugin installed.""" % locals()
self.connect('destroy', Window.__destroy_cb)
def __destroy_cb(self):
- self.snoopy.teardown()
+ try:
+ self.snoopy.teardown()
+ except GLib.GError, e:
+ print "Couldn't turn off the monitor (maybe the connection went away?)"
+ print e
Gtk.main_quit()
GABBLE_PREFIX = 'org.freedesktop.Telepathy.Connection.gabble.jabber.'