MCPcopy
hub / github.com/benoitc/gunicorn / _arm_keepalive_timer

Method _arm_keepalive_timer

gunicorn/asgi/protocol.py:652–660  ·  view source on GitHub ↗

Arm keepalive timeout timer after response completion.

(self)

Source from the content-addressed store, hash-verified

650 pass
651
652 def _arm_keepalive_timer(self):
653 """Arm keepalive timeout timer after response completion."""
654 if self._keepalive_handle:
655 self._keepalive_handle.cancel()
656 keepalive_timeout = self.cfg.keepalive
657 if keepalive_timeout > 0:
658 self._keepalive_handle = self.worker.loop.call_later(
659 keepalive_timeout, self._keepalive_timeout
660 )
661
662 def _cancel_keepalive_timer(self):
663 """Cancel keepalive timer when new request arrives."""

Callers 1

_handle_connectionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected