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:
parent
c87ff3ca26
commit
a0f7e92e40
@ -842,8 +842,12 @@ module.exports = function(RED) {
|
|||||||
if(!client) {
|
if(!client) {
|
||||||
resolve();
|
resolve();
|
||||||
} else {
|
} else {
|
||||||
const t = setTimeout(reject, ms);
|
const t = setTimeout(() => {
|
||||||
client.end(() => {
|
//clean end() has exceeded WAIT_END, lets force end!
|
||||||
|
client && client.end(true);
|
||||||
|
reject();
|
||||||
|
}, ms);
|
||||||
|
client.end(() => {
|
||||||
clearTimeout(t);
|
clearTimeout(t);
|
||||||
resolve()
|
resolve()
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user