Attempt to fix socket closing
This commit is contained in:
parent
3319960149
commit
c54c3212e2
6
index.js
6
index.js
|
@ -102,10 +102,10 @@ app.get("/api/poll/:jobid/:id", (req, res) => {
|
|||
}
|
||||
})
|
||||
|
||||
app.delete("/api/close/:jobid/:id", (req, res) => {
|
||||
app.delete("/api/close/:jobid/:id", async (req, res) => {
|
||||
var id = req.params.id;
|
||||
ws_[id].connection.terminate();
|
||||
delete ws_[id];
|
||||
await ws_[id].connection.terminate();
|
||||
await delete ws_[id];
|
||||
res.send({
|
||||
success: true
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue