close_stream_writer

lsst.ts.hexrotcomm.close_stream_writer(writer)

Close an asyncio.StreamWriter and wait for it to finish closing.

Safe to call even if the stream is closed or being closed, except…

Warning: this may raise asyncio.CancelledError if the stream is already being closed. I suspect this is a bug in Python 3.7.6.