Skip to content
Snippets Groups Projects
Commit 8d51bc3c authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[fix] #1141 Immediately close a WS2P connection if it fails

parent f7df3868
No related branches found
No related tags found
No related merge requests found
...@@ -36,7 +36,13 @@ export class WS2PClient { ...@@ -36,7 +36,13 @@ export class WS2PClient {
}) })
// Connecting // Connecting
try {
await c.connect() await c.connect()
} catch (e) {
// Immediately close the connection
c.close()
throw e
}
return new WS2PClient(c) return new WS2PClient(c)
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment