From 5ace2bf0e42e986f5d8639629dbde06fec891867 Mon Sep 17 00:00:00 2001 From: Thomas Hobson Date: Sat, 17 Jul 2021 00:25:19 +1200 Subject: [PATCH] api: websocket init timeout --- api/src/api/v2.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/api/v2.js b/api/src/api/v2.js index 76bab08..0c34d70 100644 --- a/api/src/api/v2.js +++ b/api/src/api/v2.js @@ -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) })