api: websocket init timeout
This commit is contained in:
parent
4933577dae
commit
5ace2bf0e4
|
@ -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)
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue