Skip to content

Commit e195cb7

Browse files
willingcminrk
authored andcommitted
Adjust timeout decision
1 parent fa2e1f5 commit e195cb7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jupyter_client/blocking/client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def wait_for_ready(self, timeout=None):
2222
abs_timeout = float('inf')
2323
else:
2424
abs_timeout = time.time() + timeout
25+
2526
# Wait for kernel info reply on shell channel
2627
while True:
2728
try:
@@ -36,7 +37,8 @@ def wait_for_ready(self, timeout=None):
3637
if not self.is_alive():
3738
raise RuntimeError('Kernel died before replying to kernel_info')
3839

39-
if time.time() < abs_timeout:
40+
# Check if current time is ready check time plus timeout
41+
if time.time() > abs_timeout:
4042
raise RuntimeError("Kernel didn't respond in %d seconds" % timeout)
4143

4244
# Flush IOPub channel

0 commit comments

Comments
 (0)