Commit e4601dc0 authored by Vincent Pelletier's avatar Vincent Pelletier

lib.connection: Reuse setHandler to initialise _pending.

parent 7539342c
...@@ -82,8 +82,9 @@ class HandlerSwitcher(object): ...@@ -82,8 +82,9 @@ class HandlerSwitcher(object):
def __init__(self, handler): def __init__(self, handler):
# pending handlers and related requests # pending handlers and related requests
self._pending = [[{}, handler]] self._pending = []
self._is_handling = False self._is_handling = False
self.setHandler(handler)
def clear(self): def clear(self):
self.__init__(self.getLastHandler()) self.__init__(self.getLastHandler())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment