Skip to content

Commit

Permalink
fixing ToFuture: dispose was done too late
Browse files Browse the repository at this point in the history
  • Loading branch information
semiversus committed Jun 15, 2018
1 parent 4fb6de2 commit adb591b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion broqer/op/to_future.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ def _timeout(self):
self.set_exception(asyncio.TimeoutError)

def _future_done(self, future):
self._disposable.dispose()
if self._timeout_handle is not None:
self._timeout_handle.cancel()

Expand All @@ -57,6 +56,7 @@ def emit(self, *args: Any, who: Publisher) -> None:
assert not hasattr(self, '_disposable') or \
who == self._disposable._publisher, \
'emit comming from non assigned publisher'
self._disposable.dispose()
if len(args) == 1:
self.set_result(args[0])
else:
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ current_version = 0.3.0-dev
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+).(?P<patch>\d+)(-(?P<release>[a-z]+))?
serialize =
serialize =
{major}.{minor}.{patch}-{release}
{major}.{minor}.{patch}

[bumpversion:part:release]
optional_value = gamma
values =
values =
dev
gamma

Expand Down

0 comments on commit adb591b

Please sign in to comment.