MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / close_connection

Method close_connection

mitmproxy/proxy/layers/http/_http2.py:324–333  ·  view source on GitHub ↗
(self, msg: str)

Source from the content-addressed store, hash-verified

322 yield from self.close_connection(message)
323
324 def close_connection(self, msg: str) -> CommandGenerator[None]:
325 yield CloseConnection(self.conn)
326 for stream_id in self.streams:
327 yield ReceiveHttp(
328 self.ReceiveProtocolError(
329 stream_id, msg, self.ReceiveProtocolError.code
330 )
331 )
332 self.streams.clear()
333 self._handle_event = self.done # type: ignore
334
335 @expect(DataReceived, HttpEvent, ConnectionClosed, Wakeup)
336 def done(self, _) -> CommandGenerator[None]:

Callers 4

_handle_eventMethod · 0.95
handle_h2_eventMethod · 0.95
protocol_errorMethod · 0.95
_handle_eventMethod · 0.45

Calls 3

CloseConnectionClass · 0.85
ReceiveHttpClass · 0.85
clearMethod · 0.45

Tested by

no test coverage detected