1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

call client.end with force=true on timeout

This commit is contained in:
Phil Day 2022-05-09 16:29:39 +01:00 committed by Steve-Mcl
parent 6a799e7e2a
commit 2ded07c765

View File

@ -783,7 +783,11 @@ module.exports = function(RED) {
if(!client) {
resolve();
} else {
const t = setTimeout(reject, ms);
const t = setTimeout(() => {
//clean end() has exceeded WAIT_END, lets force end!
client && client.end(true);
reject();
}, ms);
client.end(() => {
clearTimeout(t);
resolve()