forked from goodboy/tractor
1
0
Fork 0

Tolerate double `.remove()`s of stream on portal teardowns

sigintsaviour_citesthackin
Tyler Goodlet 2022-05-14 17:42:03 -04:00
parent deaca7d6cc
commit c7035be2fc
1 changed files with 8 additions and 1 deletions

View File

@ -601,7 +601,14 @@ class Context:
finally:
if self._portal:
self._portal._streams.remove(rchan)
try:
self._portal._streams.remove(stream)
except KeyError:
log.warning(
f'Stream was already destroyed?\n'
f'actor: {self.chan.uid}\n'
f'ctx id: {self.cid}'
)
async def result(self) -> Any:
'''