forked from LBRYCommunity/lbry-sdk
switch stop to inlineCallback
This commit is contained in:
parent
15c5075d38
commit
f535d96929
1 changed files with 3 additions and 3 deletions
|
@ -41,13 +41,13 @@ class ConnectionManager(object):
|
||||||
self._next_manage_call = reactor.callLater(0, self._manage)
|
self._next_manage_call = reactor.callLater(0, self._manage)
|
||||||
return defer.succeed(True)
|
return defer.succeed(True)
|
||||||
|
|
||||||
|
@defer.inlineCallbacks
|
||||||
def stop(self):
|
def stop(self):
|
||||||
self.stopped = True
|
self.stopped = True
|
||||||
if self._next_manage_call is not None and self._next_manage_call.active() is True:
|
if self._next_manage_call and self._next_manage_call.active():
|
||||||
self._next_manage_call.cancel()
|
self._next_manage_call.cancel()
|
||||||
self._next_manage_call = None
|
self._next_manage_call = None
|
||||||
|
yield self._close_peers()
|
||||||
return self._close_peers()
|
|
||||||
|
|
||||||
def _close_peers(self):
|
def _close_peers(self):
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue