MCPcopy
hub / github.com/encode/uvicorn / on_response_complete

Method on_response_complete

uvicorn/protocols/http/h11_impl.py:321–338  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

319 self.transport.close()
320
321 def on_response_complete(self) -> None:
322 self.server_state.total_requests += 1
323
324 if self.transport.is_closing():
325 return
326
327 # Set a short Keep-Alive timeout.
328 self._unset_keepalive_if_required()
329
330 self.timeout_keep_alive_task = self.loop.call_later(self.timeout_keep_alive, self.timeout_keep_alive_handler)
331
332 # Unpause data reads if needed.
333 self.flow.resume_reading()
334
335 # Unblock any pipelined events.
336 if self.conn.our_state is h11.DONE and self.conn.their_state is h11.DONE:
337 self.conn.start_next_cycle()
338 self.handle_events()
339
340 def shutdown(self) -> None:
341 """

Callers

nothing calls this directly

Calls 5

handle_eventsMethod · 0.95
is_closingMethod · 0.45
call_laterMethod · 0.45
resume_readingMethod · 0.45

Tested by

no test coverage detected