Skip to content

Commit

Permalink
wip: Resolve process hangs during shutdown.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcass77 committed Aug 5, 2020
1 parent 3ac27c6 commit 53c3006
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wtfix/apps/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,15 +234,19 @@ async def listen(self):
f"'{utils.decode(e.partial)}' ({e})."
)

# Stop listening for messages
asyncio.create_task(self.pipeline.stop())
break

except LimitOverrunError as e:
# Buffer limit reached before a complete message could be read - abort!
logger.error(
f"{self.name}: Stream reader buffer limit exceeded! ({e})."
)

# Stop listening for messages
asyncio.create_task(self.pipeline.stop())
break

async def on_send(self, message):
"""
Expand Down

0 comments on commit 53c3006

Please sign in to comment.