Skip to content

Commit

Permalink
Only second SIGINT is able to forcelly shutdown the server (#1269)
Browse files Browse the repository at this point in the history
  • Loading branch information
HansBrende committed Nov 28, 2021
1 parent d3e6fc9 commit ecd2cc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion uvicorn/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def install_signal_handlers(self) -> None:

def handle_exit(self, sig: signal.Signals, frame: FrameType) -> None:

if self.should_exit:
if self.should_exit and sig == signal.SIGINT:
self.force_exit = True
else:
self.should_exit = True

0 comments on commit ecd2cc7

Please sign in to comment.