Skip to content

Commit

Permalink
Increase MATLAB startup timeout in kernel startup checks
Browse files Browse the repository at this point in the history
  • Loading branch information
rashedmyt committed May 24, 2023
1 parent cbd451b commit 37c5875
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/jupyter_matlab_kernel/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,10 @@ def perform_startup_checks(self):

# Wait until MATLAB is started before sending requests.
timeout = 0
MATLAB_STARTUP_MAX_TIMEOUT = 120
while (
self.matlab_status != "up"
and timeout != 15
and timeout != MATLAB_STARTUP_MAX_TIMEOUT
and not self.matlab_proxy_has_error
):
if self.is_matlab_licensed:
Expand Down Expand Up @@ -429,7 +430,7 @@ def perform_startup_checks(self):
# If MATLAB is not available after 15 seconds of licensing information
# being available either through user input or through matlab-proxy cache,
# then display connection error to the user.
if timeout == 15 or self.matlab_proxy_has_error:
if timeout == MATLAB_STARTUP_MAX_TIMEOUT or self.matlab_proxy_has_error:
raise MATLABConnectionError

def display_output(self, out):
Expand Down

0 comments on commit 37c5875

Please sign in to comment.