api: websocket init timeout

This commit is contained in:
Thomas Hobson 2021-07-17 00:25:19 +12:00
parent 4933577dae
commit 5ace2bf0e4
No known key found for this signature in database
GPG Key ID: 9F1FD9D87950DB6F
1 changed files with 2 additions and 2 deletions

View File

@ -210,8 +210,8 @@ router.ws('/connect', async (ws, req) => {
setTimeout(()=>{
//Terminate the socket after 1 second, if not initialized.
//if(job === null)
// ws.close(4001, "Initialization Timeout");
if(job === null)
ws.close(4001, "Initialization Timeout");
}, 1000)
})