Skip to content

Commit 37c5875

Browse files
committed
Increase MATLAB startup timeout in kernel startup checks
1 parent cbd451b commit 37c5875

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/jupyter_matlab_kernel/kernel.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,9 +399,10 @@ def perform_startup_checks(self):
399399

400400
# Wait until MATLAB is started before sending requests.
401401
timeout = 0
402+
MATLAB_STARTUP_MAX_TIMEOUT = 120
402403
while (
403404
self.matlab_status != "up"
404-
and timeout != 15
405+
and timeout != MATLAB_STARTUP_MAX_TIMEOUT
405406
and not self.matlab_proxy_has_error
406407
):
407408
if self.is_matlab_licensed:
@@ -429,7 +430,7 @@ def perform_startup_checks(self):
429430
# If MATLAB is not available after 15 seconds of licensing information
430431
# being available either through user input or through matlab-proxy cache,
431432
# then display connection error to the user.
432-
if timeout == 15 or self.matlab_proxy_has_error:
433+
if timeout == MATLAB_STARTUP_MAX_TIMEOUT or self.matlab_proxy_has_error:
433434
raise MATLABConnectionError
434435

435436
def display_output(self, out):

0 commit comments

Comments
 (0)