Author: js Date: 2008-10-03 15:56:36 +0200 (Fri, 03 Oct 2008) New Revision: 10473
Modified: trunk/src/gajim.py Log: Apply my suggested patch from #4368. Fixes #4368.
Modified: trunk/src/gajim.py =================================================================== --- trunk/src/gajim.py 2008-10-03 10:17:30 UTC (rev 10472) +++ trunk/src/gajim.py 2008-10-03 13:56:36 UTC (rev 10473) @@ -435,11 +435,19 @@ ''' this method is called when we plug a new idle object. Start listening for events from fd ''' - res = gobject.io_add_watch(fd, flags, self.process_events, + res = gobject.io_add_watch(fd, flags, self._process_events, priority=gobject.PRIORITY_LOW) # store the id of the watch, so that we can remove it on unplug self.events[fd] = res
+ def _process_events(self, fd, flags): + try: + return self.process_events(fd, flags) + except: + self.remove_idle(fd) + self.add_idle(fd, flags) + raise + def remove_idle(self, fd): ''' this method is called when we unplug a new idle object. Stop listening for events from fd