Skip to content

Commit

Permalink
Merge pull request #37 from ckim0419/fix_ioloop_on_import
Browse files Browse the repository at this point in the history
delay ioloop creation.
  • Loading branch information
wallyqs authored May 1, 2018
2 parents f700843 + 7156036 commit 594ddb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nats/io/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def connect(self,
error_cb=None,
disconnected_cb=None,
reconnected_cb=None,
io_loop=tornado.ioloop.IOLoop.instance(),
io_loop=None,
max_read_buffer_size=DEFAULT_READ_BUFFER_SIZE,
max_write_buffer_size=DEFAULT_WRITE_BUFFER_SIZE,
read_chunk_size=DEFAULT_READ_CHUNK_SIZE,
Expand Down Expand Up @@ -187,7 +187,7 @@ def connect(self,
self._error_cb = error_cb
self._disconnected_cb = disconnected_cb
self._reconnected_cb = reconnected_cb
self._loop = io_loop
self._loop = io_loop if io_loop else tornado.ioloop.IOLoop.instance()
self._max_read_buffer_size = max_read_buffer_size
self._max_write_buffer_size = max_write_buffer_size
self._read_chunk_size = read_chunk_size
Expand Down

0 comments on commit 594ddb2

Please sign in to comment.