mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-20 21:41:32 +01:00
Unconditional non-fatal server start error logs
This commit is contained in:
parent
e707def7dd
commit
82e569cf08
14
server.js
14
server.js
@ -787,17 +787,17 @@ function logSecurityAlert(message) {
|
||||
*/
|
||||
function handleServerListenFail(v6Failed, v4Failed) {
|
||||
if (v6Failed && !enableIPv4) {
|
||||
console.error('fatal error: Failed to start server on IPv6 and IPv4 disabled');
|
||||
console.error(color.red('fatal error: Failed to start server on IPv6 and IPv4 disabled'));
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (v4Failed && !enableIPv6) {
|
||||
console.error('fatal error: Failed to start server on IPv4 and IPv6 disabled');
|
||||
console.error(color.red('fatal error: Failed to start server on IPv4 and IPv6 disabled'));
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (v6Failed && v4Failed) {
|
||||
console.error('fatal error: Failed to start server on both IPv6 and IPv4');
|
||||
console.error(color.red('fatal error: Failed to start server on both IPv6 and IPv4'));
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
@ -846,9 +846,7 @@ async function startHTTPorHTTPS() {
|
||||
try {
|
||||
await createFunc(tavernUrlV6);
|
||||
} catch (error) {
|
||||
if (enableIPv4) {
|
||||
console.error('non-fatal error: failed to start server on IPv6', error);
|
||||
}
|
||||
console.error('non-fatal error: failed to start server on IPv6', error);
|
||||
|
||||
v6Failed = true;
|
||||
}
|
||||
@ -858,9 +856,7 @@ async function startHTTPorHTTPS() {
|
||||
try {
|
||||
await createFunc(tavernUrl);
|
||||
} catch (error) {
|
||||
if (enableIPv6) {
|
||||
console.error('non-fatal error: failed to start server on IPv4', error);
|
||||
}
|
||||
console.error('non-fatal error: failed to start server on IPv4', error);
|
||||
|
||||
v4Failed = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user