connect cooldown + terminate WS instead of close

This commit is contained in:
Adhiraj
2020-09-01 13:16:50 +05:30
parent 218c9bcc18
commit 50d50e4ae9
5 changed files with 29 additions and 57 deletions

View File

@@ -123,7 +123,7 @@ export const openWebSocketConnection = (timeoutMs: number, retryOnNetworkError:
try {
const ws = await newWS()
if (cancelled) {
ws.close ()
ws.terminate ()
break
} else return ws
} catch (error) {