uasyncio: test_http_server_heavy: Close socket with "finally".

pull/227/merge
Paul Sokolovsky 2017-11-05 17:46:50 +02:00
rodzic f81285ff4e
commit 9c18d6f39b
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -18,7 +18,6 @@ def serve(reader, writer):
yield from writer.awrite(s * 100)
yield from writer.awrite(s * 400000)
yield from writer.awrite("=== END ===")
yield from writer.aclose()
except OSError as e:
if e.args[0] == errno.EPIPE:
print("EPIPE")
@ -26,6 +25,8 @@ def serve(reader, writer):
print("ECONNRESET")
else:
raise
finally:
yield from writer.aclose()
import logging