Skip to content
Browse files

kill an io_loop check

  • Loading branch information...
1 parent c886cc1 commit 960816cb708c6bd6b1de8aa9c29758e327784f13 @jokey2k jokey2k committed
Showing with 1 addition and 3 deletions.
  1. +1 −3 pyfire/server.py
View
4 pyfire/server.py
@@ -24,7 +24,7 @@ class XMPPServer(object):
"""A non-blocking, single-threaded XMPP server."""
def __init__(self, io_loop=None):
- self.io_loop = io_loop
+ self.io_loop = io_loop or ioloop.IOLoop.instance()
self._sockets = {} # fd -> socket object
self._started = False
self._connections = {}
@@ -93,8 +93,6 @@ def start(self):
"""Starts this server in the IOLoop."""
assert not self._started
- if not self.io_loop:
- self.io_loop = ioloop.IOLoop.instance()
for fd in self._sockets.keys():
self.io_loop.add_handler(fd, self._handle_events,
ioloop.IOLoop.READ)

0 comments on commit 960816c

Please sign in to comment.
Something went wrong with that request. Please try again.