Skip to content

Commit 58b9b6b

Browse files
committed
[fix] Convert protocol option to a number
1 parent 02c3374 commit 58b9b6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/wscat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ if (program.listen && program.connect) {
181181
var cont = function () {
182182
var wsConsole = new Console();
183183

184-
if (program.protocol) options.protocolVersion = program.protocol;
184+
if (program.protocol) options.protocolVersion = +program.protocol;
185185
if (program.origin) options.origin = program.origin;
186186
if (program.subprotocol) options.protocol = program.subprotocol;
187187
if (program.host) options.host = program.host;
@@ -227,7 +227,7 @@ if (program.listen && program.connect) {
227227
if (!ws) return;
228228

229229
try { ws.close(); }
230-
catch(e) {}
230+
catch (e) {}
231231

232232
process.exit();
233233
});

0 commit comments

Comments
 (0)