Skip to content

Commit

Permalink
Wait for stream close before returning from callback.
Browse files Browse the repository at this point in the history
  • Loading branch information
ktlim authored Sep 12, 2024
1 parent b5e72fa commit d9da01a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/s3daemon/s3daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ async def handle_client(client, reader, writer):
writer.write(b"Success")
except Exception as e:
writer.write(bytes(repr(e), "UTF-8"))
await writer.drain()
writer.close()
await writer.wait_closed()
log.info("%f %f sec", start, time.time() - start)


Expand Down

0 comments on commit d9da01a

Please sign in to comment.