kopia lustrzana https://github.com/Yakifo/amqtt
Ensure draining on close
rodzic
53b7168c1c
commit
1366e53167
|
@ -165,6 +165,9 @@ class StreamWriterAdapter(WriterAdapter):
|
|||
|
||||
@asyncio.coroutine
|
||||
def close(self):
|
||||
yield from self._writer.drain()
|
||||
if self._writer.can_write_eof():
|
||||
self._writer.write_eof()
|
||||
self._writer.close()
|
||||
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue