From e8f840c5487aa695540006c04003c6b39b5a05c8 Mon Sep 17 00:00:00 2001 From: d3x0r Date: Wed, 21 Dec 2016 11:21:13 -0800 Subject: [PATCH] pass gun's options to websocket I recently had to set options given to the websocket client especially rejectUnauthorized {Boolean} Verify or not the server certificate. for connecting to wss which are using self signed certs... could also pass things like 'protocol' to differentiate a Gun websocket connection from some other websocket connection.... I don't know if maybe websock options should be a object in options instead ? To avoid namespace collision? --- lib/wsp/Peer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wsp/Peer.js b/lib/wsp/Peer.js index 493ba8e7..13a472b1 100644 --- a/lib/wsp/Peer.js +++ b/lib/wsp/Peer.js @@ -134,7 +134,7 @@ API.connect = function () { var url = this.url; // Open a new websocket. - var socket = new WebSocket(url); + var socket = new WebSocket(url, this.options); // Re-use the previous listeners. socket._events = this._events;