ethereum / lahja

Lahja is a generic multi process event bus implementation written in Python 3.6+ to enable lightweight inter-process communication, based on non-blocking asyncio
MIT License
394 stars 19 forks source link

Ensure lahja closes asyncio streams #157

Closed pipermerriam closed 5 years ago

pipermerriam commented 5 years ago

What was wrong?

We weren't closing the asyncio streams when and endpoint shuts down.

In trinity this caused a lot of ResourceWarning: warnings to end up in the terminal on shutdown.

How was it fixed?

Added ConnectionAPI.close() and ensure that it's called during the closing of the RemoteConnection.

To-Do

Cute Animal Picture

cat-angry-posing-funny-cat-pics

pipermerriam commented 5 years ago

not definitive but I also think is a major culprit for how long trinity takes to shutdown. shutdowns seem much faster with this change.