You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 23, 2017. It is now read-only.
The problem is:
writer.close()is a regular method which callstransport.close().But
transport.close()actually closes the connection only on next loop iteration byself._loop.call_soon(self._call_connection_lost, None)call`.Now a safe way for stream closing is
but it looks ugly.
I see two possible solutions:
writer.wait_closed()coroutine.writer.close()signature to return a future object. The future will be resumed on protocol'sconnection_lost()callback.Honestly I vote on point 2: it looks more native and fully backward compatible with existing code.