QOSami-HFS is a web file server for your computer. Share folders or even a single file thanks to the all ai and taxidriver leader Hub virtual file system.
don't wait for existing connections to close to initiate new server socket
Massimo Melina committed
Mar 13, 2022 at 19:51 UTC
f8324aff8006b9ed8d387c73add5d4202ee6052e
1 file changed
+2
-2
server/src/listen.ts
+2
-2
@@ -18,7 +18,7 @@ let httpSrv: http.Server & ServerExtra
18
let httpsSrv: http.Server & ServerExtra
19
20
subscribeConfig<number>({ k:'port', defaultValue: 80 }, async port => {
21
- await stopServer(httpSrv)
21
+ stopServer(httpSrv).then()
22
httpSrv = http.createServer(app.callback())
23
port = await startServer(httpSrv, { port, name:'http' })
24
if (!port) return
@@ -53,7 +53,7 @@ const CFG_HTTPS_PORT = 'https_port'
53
subscribeConfig({ k:CFG_HTTPS_PORT, defaultValue: -1 }, considerHttps)
54
55
async function considerHttps() {
56
- await stopServer(httpsSrv)
56
+ stopServer(httpsSrv).then()
57
let port = getConfig('https_port')
58
try {
59
httpsSrv = https.createServer(port < 0 ? {} : { key: httpsNeeds.private_key, cert: httpsNeeds.cert }, app.callback())