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

Method _half_close_local

gunicorn/http2/stream.py:269–279  ·  view source on GitHub ↗

Transition to half-closed (local) state.

(self)

Source from the content-addressed store, hash-verified

267 self.priority_exclusive = exclusive
268
269 def _half_close_local(self):
270 """Transition to half-closed (local) state."""
271 if self.state == StreamState.OPEN:
272 self.state = StreamState.HALF_CLOSED_LOCAL
273 elif self.state == StreamState.HALF_CLOSED_REMOTE:
274 self.state = StreamState.CLOSED
275 else:
276 raise HTTP2StreamError(
277 self.stream_id,
278 f"Cannot half-close local in state {self.state.name}"
279 )
280
281 def _half_close_remote(self):
282 """Transition to half-closed (remote) state."""

Calls 1

HTTP2StreamErrorClass · 0.85