From 2ebd9bc9a4591a83a7f18daeb57f3d7af5681279 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Wed, 5 Jan 2022 17:09:52 +0300 Subject: fix --- si7021d | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'si7021d') diff --git a/si7021d b/si7021d index 2a1e6c6..544a85d 100644 --- a/si7021d +++ b/si7021d @@ -48,7 +48,10 @@ async def handle_client(reader, writer): data = dict(error='invalid request') writer.write((json.dumps(data) + '\r\n').encode('utf-8')) - await writer.drain() + try: + await writer.drain() + except ConnectionResetError: + pass writer.close() -- cgit v1.2.3