mirror of
https://github.com/koush/scrypted.git
synced 2026-04-26 09:50:21 +01:00
common: fix socket leak in single client listener
This commit is contained in:
@@ -61,6 +61,7 @@ export async function listenZeroSingleClient() {
|
||||
|
||||
const clientPromise = new Promise<net.Socket>((resolve, reject) => {
|
||||
const timeout = setTimeout(() => {
|
||||
server.close();
|
||||
reject(new Error('timeout waiting for client'));
|
||||
}, 30000)
|
||||
server.on('connection', client => {
|
||||
|
||||
Reference in New Issue
Block a user