diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2022-01-05 17:09:52 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2022-01-05 17:09:52 +0300 |
commit | 2ebd9bc9a4591a83a7f18daeb57f3d7af5681279 (patch) | |
tree | 15a60d18651ae356662200e809c3ff116bb85f4c /si7021d | |
parent | 93986d97672f2a7bbfd11929ad8f5c7dc7181b5a (diff) |
Diffstat (limited to 'si7021d')
-rw-r--r-- | si7021d | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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() |