Skip to content

Commit

Permalink
ignore some features in async mode
Browse files Browse the repository at this point in the history
  • Loading branch information
zrquan committed Sep 13, 2024
1 parent 1b0df56 commit 6202049
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/controller/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,14 @@ def handle_pause(self):
option = input()

if option.lower() == "q":
if options["async_mode"]:
quitexc = QuitInterrupt("Canceled by the user")
if options["async_mode"]:
self.pause_future.set_exception(quitexc)
break
else:
raise quitexc

interface.in_line("[s]ave / [q]uit without saving: ")

option = input()
Expand Down
6 changes: 6 additions & 0 deletions lib/core/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ def parse_options():
opt = parse_config(parse_arguments())

if opt.session_file:
if opt.async_mode:
print("Cannot resume a session in asynchronous mode")
exit(1)
return vars(opt)

opt.http_method = opt.http_method.upper()
Expand Down Expand Up @@ -199,6 +202,9 @@ def parse_options():
f"{', '.join(OUTPUT_FORMATS)}"
)
exit(1)

if opt.async_mode and opt.replay_proxy:
print("WARNING: --replay-proxy doesn't work in asynchronous mode")

return vars(opt)

Expand Down

0 comments on commit 6202049

Please sign in to comment.