@samitouri / QOSami-HFS / commits / 4832f832

fix: linux automatic update not working #1179

Massimo Melina committed Mar 15, 2026 at 22:53 UTC 4832f832fa154bc438696b5a697030f00a52d5dd
1 file changed +4
src/listen.ts
+4
@@ -23,11 +23,15 @@ import { defaultBaseUrl } from './nat'
23 import { storedMap } from './persistence'
24 import { argv } from './argv'
25 import { consoleHint } from './consoleLog'
26 +import { onProcessExit } from './first'
27
28 interface ServerExtra { name: string, error?: string, busy?: Promise<string> }
29 let httpSrv: undefined | http.Server & ServerExtra
30 let httpsSrv: undefined | http.Server & ServerExtra
31
32 +// update relaunch can keep a bridge process alive, so we proactively close listeners here to release ports before the next binary binds
33 +onProcessExit(() => Promise.all([stopServer(httpSrv), stopServer(httpsSrv)]))
34 +
35 const openBrowserAtStart = defineConfig('open_browser_at_start', true)
36
37 export const baseUrl = defineConfig(CFG.base_url, '',