File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -833,6 +833,7 @@ class ServerApp(JupyterApp):
833833 )
834834
835835 _log_formatter_cls = LogFormatter # type:ignore[assignment]
836+ _stopping = Bool (False , help = "Signal that we've begun stopping." )
836837
837838 @default ("log_level" )
838839 def _default_log_level (self ):
@@ -2264,6 +2265,10 @@ def _confirm_exit(self):
22642265 self .stop (from_signal = True )
22652266 return
22662267 else :
2268+ if self ._stopping :
2269+ # don't show 'no answer' if we're actually stopping,
2270+ # e.g. ctrl-C ctrl-C
2271+ return
22672272 info (_i18n ("No answer for 5s:" ))
22682273 info (_i18n ("resuming operation..." ))
22692274 # no answer, or answer is no:
@@ -2960,6 +2965,8 @@ async def _stop(self):
29602965
29612966 def stop (self , from_signal = False ):
29622967 """Cleanup resources and stop the server."""
2968+ # signal that stopping has begun
2969+ self ._stopping = True
29632970 if hasattr (self , "http_server" ):
29642971 # Stop a server if its set.
29652972 self .http_server .stop ()
You can’t perform that action at this time.
0 commit comments