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

Method stop

mitmproxy/proxy/mode_servers.py:143–156  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

141 logger.info(f"{self.mode.description} started.")
142
143 async def stop(self) -> None:
144 listen_addrs = self.listen_addrs
145 try:
146 await self._stop()
147 except Exception as e:
148 self.last_exception = e
149 raise
150 else:
151 self.last_exception = None
152 if listen_addrs:
153 addrs = " and ".join({human.format_address(a) for a in listen_addrs})
154 logger.info(f"{self.mode.description} at {addrs} stopped.")
155 else:
156 logger.info(f"{self.mode.description} stopped.")
157
158 @abstractmethod
159 async def _start(self) -> None:

Callers 15

test_tcp_start_stopFunction · 0.45
test_tcp_timeoutFunction · 0.45
test_transparentFunction · 0.45
test_wireguardFunction · 0.45
test_udp_start_stopFunction · 0.45
test_udp_start_errorFunction · 0.45
test_dual_stackFunction · 0.45
test_dns_start_stopFunction · 0.45
test_tun_modeFunction · 0.45

Calls 3

_stopMethod · 0.95
infoMethod · 0.80
joinMethod · 0.45

Tested by 15

test_tcp_start_stopFunction · 0.36
test_tcp_timeoutFunction · 0.36
test_transparentFunction · 0.36
test_wireguardFunction · 0.36
test_udp_start_stopFunction · 0.36
test_udp_start_errorFunction · 0.36
test_dual_stackFunction · 0.36
test_dns_start_stopFunction · 0.36
test_tun_modeFunction · 0.36