fix: add 1 second timeout to auto-reject and close the connection
This commit is contained in:
parent
17b9af7e71
commit
ac4aaceb73
|
@ -68,5 +68,10 @@ export default async (
|
||||||
client.end();
|
client.end();
|
||||||
resolve({ host: json.host, port: json.port });
|
resolve({ host: json.host, port: json.port });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
client.end();
|
||||||
|
reject();
|
||||||
|
}, 1000);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue