server: Refine return value of WSChiaConnection.send_message (#9305)

This commit is contained in:
dustinface 2021-11-19 20:13:50 +01:00 committed by GitHub
parent c4e14f5c78
commit f8e8edc567
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -274,11 +274,12 @@ class WSChiaConnection:
self.log.error(f"Exception: {e}")
self.log.error(f"Exception Stack: {error_stack}")
async def send_message(self, message: Message):
async def send_message(self, message: Message) -> bool:
"""Send message sends a message with no tracking / callback."""
if self.closed:
return None
return False
await self.outgoing_queue.put(message)
return True
def __getattr__(self, attr_name: str):
# TODO KWARGS