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

Method __continue

mitmproxy/proxy/layer.py:224–240  ·  view source on GitHub ↗

Continue processing events after being paused. The tricky part here is that events in the event queue may trigger commands which again pause the execution, so we may not be able to process the entire queue.

(self, event: events.CommandCompleted)

Source from the content-addressed store, hash-verified

222 return
223
224 def __continue(self, event: events.CommandCompleted):
225 """
226 Continue processing events after being paused.
227 The tricky part here is that events in the event queue may trigger commands which again pause the execution,
228 so we may not be able to process the entire queue.
229 """
230 assert self._paused is not None
231 command_generator = self._paused.generator
232 self._paused = None
233 yield from self.__process(command_generator, event.reply)
234
235 while not self._paused and self._paused_event_queue:
236 ev = self._paused_event_queue.popleft()
237 if self.debug is not None:
238 yield self.__debug(f"!> {ev}")
239 command_generator = self._handle_event(ev)
240 yield from self.__process(command_generator)
241
242
243mevents = (

Callers 1

handle_eventMethod · 0.95

Calls 3

__processMethod · 0.95
__debugMethod · 0.95
_handle_eventMethod · 0.95

Tested by

no test coverage detected