mirror of
https://github.com/solero/houdini.git
synced 2024-11-22 05:27:23 +00:00
Check transport is not closing before writing to it
This commit is contained in:
parent
dbf7e4d35e
commit
b25ac3c240
@ -79,8 +79,9 @@ class Spheniscidae:
|
|||||||
await self.send_line(xml_data.decode('utf-8'))
|
await self.send_line(xml_data.decode('utf-8'))
|
||||||
|
|
||||||
async def send_line(self, data):
|
async def send_line(self, data):
|
||||||
self.logger.debug(f'Outgoing data: {data}')
|
if not self.__writer.is_closing():
|
||||||
self.__writer.write(data.encode('utf-8') + Spheniscidae.Delimiter)
|
self.logger.debug(f'Outgoing data: {data}')
|
||||||
|
self.__writer.write(data.encode('utf-8') + Spheniscidae.Delimiter)
|
||||||
|
|
||||||
async def close(self):
|
async def close(self):
|
||||||
self.__writer.close()
|
self.__writer.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user