File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -768,10 +768,12 @@ async def _async_poll_for_reply(
768
768
) -> dict [str , t .Any ]:
769
769
msg : dict [str , t .Any ]
770
770
assert self .kc is not None
771
- new_timeout : float | None = None
772
771
if timeout is not None :
773
772
deadline = monotonic () + timeout
774
773
new_timeout = float (timeout )
774
+ else :
775
+ deadline = monotonic () + 5
776
+ new_timeout = float (5 )
775
777
error_on_timeout_execute_reply = None
776
778
while True :
777
779
try :
@@ -800,7 +802,10 @@ async def _async_poll_for_reply(
800
802
new_timeout = max (0 , deadline - monotonic ())
801
803
except Empty :
802
804
# received no message, check if kernel is still alive
803
- assert timeout is not None
805
+ if timeout is None :
806
+ deadline = monotonic () + 5
807
+ new_timeout = float (5 )
808
+ continue
804
809
task_poll_kernel_alive .cancel ()
805
810
await self ._async_check_alive ()
806
811
error_on_timeout_execute_reply = await self ._async_handle_timeout (timeout , cell )
You can’t perform that action at this time.
0 commit comments