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):
833
833
)
834
834
835
835
_log_formatter_cls = LogFormatter # type:ignore[assignment]
836
+ _stopping = Bool (False , help = "Signal that we've begun stopping." )
836
837
837
838
@default ("log_level" )
838
839
def _default_log_level (self ):
@@ -2264,6 +2265,10 @@ def _confirm_exit(self):
2264
2265
self .stop (from_signal = True )
2265
2266
return
2266
2267
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
2267
2272
info (_i18n ("No answer for 5s:" ))
2268
2273
info (_i18n ("resuming operation..." ))
2269
2274
# no answer, or answer is no:
@@ -2960,6 +2965,8 @@ async def _stop(self):
2960
2965
2961
2966
def stop (self , from_signal = False ):
2962
2967
"""Cleanup resources and stop the server."""
2968
+ # signal that stopping has begun
2969
+ self ._stopping = True
2963
2970
if hasattr (self , "http_server" ):
2964
2971
# Stop a server if its set.
2965
2972
self .http_server .stop ()
You can’t perform that action at this time.
0 commit comments