Prevent `HttpProtocol.close` from crashing on closed client connection
@@ -241,6 +241,7 @@ cdef class HttpProtocol:
self.server._http_last_minute_requests += 1
cdef close(self):
+ if self.transport is not None:
self.transport.close()
self.transport = None
self.unprocessed = None
