Fix close
This commit is contained in:
parent
12eb3aef9b
commit
f69cc9c451
2
index.js
2
index.js
|
@ -27,7 +27,7 @@ app.put('/api/connect/:jobid', (req, res) => {
|
||||||
ws_[id].message = data;
|
ws_[id].message = data;
|
||||||
})
|
})
|
||||||
ws_[id].connection.on('close', function() {
|
ws_[id].connection.on('close', function() {
|
||||||
if (ws_[id].connection) {
|
if (ws_[id]) {
|
||||||
ws_[id].connection.terminate();
|
ws_[id].connection.terminate();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue