Skip to content

Commit

Permalink
feat: more connection close strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Aug 23, 2021
1 parent f9abd00 commit 1d7843a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/echo/hello_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def connection_made(self, transport):
print("Connection from %s" % str(self.peername))

def connection_lost(self, exc):
print("Connection from %s lost" % str(self.peername))
print("Connection from %s lost (%s)" % (str(self.peername), str(exc)))

def data_received(self, data):
self.transport.write(b"HTTP/1.0 200 OK\r\nConnection: close\r\nContent-Type: text/plain\r\nContent-Length: 13\r\n\r\nHello, world!")
Expand Down

0 comments on commit 1d7843a

Please sign in to comment.