Fix session factory

pull/14559/head
Art4 2024-11-19 07:46:52 +00:00
parent c1c158ccda
commit cde93c68dc
1 changed files with 10 additions and 4 deletions

View File

@ -76,15 +76,21 @@ class Session
default:
$handler = null;
}
$session = new Native($baseURL, $handler);
} catch (Throwable $e) {
$logger->notice('Unable to create session', ['mode' => $mode, 'session_handler' => $session_handler, 'exception' => $e]);
$session = new Memory();
} finally {
$profiler->stopRecording();
return $session;
}
try {
$session = new Native($baseURL, $handler);
} catch (Throwable $e) {
$logger->notice('Unable to create session', ['mode' => $mode, 'session_handler' => $session_handler, 'exception' => $e]);
$session = new Memory();
}
$profiler->stopRecording();
return $session;
}
}