mirror of
https://github.com/LmeSzinc/AzurLaneAutoScript.git
synced 2025-01-09 10:17:38 +08:00
Fix: Start if backend started already
This commit is contained in:
parent
87a0afb325
commit
3cd9078fd8
@ -126,8 +126,10 @@ alas.on('stderr', function (message: string) {
|
|||||||
* Receive logs, judge if Alas is ready
|
* Receive logs, judge if Alas is ready
|
||||||
* For starlette backend, there will have:
|
* For starlette backend, there will have:
|
||||||
* `INFO: Uvicorn running on http://0.0.0.0:22267 (Press CTRL+C to quit)`
|
* `INFO: Uvicorn running on http://0.0.0.0:22267 (Press CTRL+C to quit)`
|
||||||
|
* Or backend has started already
|
||||||
|
* `[Errno 10048] error while attempting to bind on address ('0.0.0.0', 22267): `
|
||||||
*/
|
*/
|
||||||
if (message.includes('running on')) {
|
if (message.includes('running on') || message.includes('bind on address')) {
|
||||||
alas.removeAllListeners('stderr');
|
alas.removeAllListeners('stderr');
|
||||||
loadURL()
|
loadURL()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user