File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -469,6 +469,16 @@ async def matlab_view(req):
469469 mwapikey = req .app ["settings" ]["mwapikey" ]
470470 matlab_base_url = f"{ matlab_protocol } ://127.0.0.1:{ matlab_port } "
471471
472+ # If we are trying to send request to matlab while the matlab_port is still not assigned
473+ # by embedded connector, return service not available and log a message
474+ if not matlab_port :
475+ logger .debug (
476+ "MATLAB hasn't fully started, please retry after embedded connector has started"
477+ )
478+ raise web .HTTPServiceUnavailable (
479+ "MATLAB hasn't fully started yet, please retry after some time."
480+ )
481+
472482 # WebSocket
473483 # According to according to RFC6455 (https://www.rfc-editor.org/rfc/rfc6455.html)
474484 # the values of 'connection' and 'upgrade' keys of request header
You can’t perform that action at this time.
0 commit comments