mirror of
https://github.com/koush/scrypted.git
synced 2026-02-12 10:02:04 +00: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