diff options
-rw-r--r-- | mitmproxy/tools/_main.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mitmproxy/tools/_main.py b/mitmproxy/tools/_main.py index a00a3e98..0163e8d3 100644 --- a/mitmproxy/tools/_main.py +++ b/mitmproxy/tools/_main.py @@ -114,7 +114,7 @@ def run( loop = asyncio.get_event_loop() for signame in ('SIGINT', 'SIGTERM'): try: - loop.add_signal_handler(getattr(signal, signame), master.shutdown) + loop.add_signal_handler(getattr(signal, signame), getattr(master, "prompt_for_exit", master.shutdown)) except NotImplementedError: # Not supported on Windows pass |