Skip to content

Commit

Permalink
Merge pull request #4674 from asreimer/patch-1
Browse files Browse the repository at this point in the history
bugfix: shutdown_server returns True when pid exists
  • Loading branch information
takluyver authored Jun 25, 2019
2 parents 2d27429 + dd0f5d2 commit 3c9cad6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions notebook/notebookapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ def shutdown_server(server_info, timeout=5, log=None):

# Poll to see if it shut down.
for _ in range(timeout*10):
if check_pid(pid):
if not check_pid(pid):
if log: log.debug("Server PID %s is gone", pid)
return True
time.sleep(0.1)
Expand All @@ -434,7 +434,7 @@ def shutdown_server(server_info, timeout=5, log=None):

# Poll to see if it shut down.
for _ in range(timeout * 10):
if check_pid(pid):
if not check_pid(pid):
if log: log.debug("Server PID %s is gone", pid)
return True
time.sleep(0.1)
Expand Down

0 comments on commit 3c9cad6

Please sign in to comment.