diff --git a/lib/wsp/Peer.js b/lib/wsp/Peer.js index 223e21aa..743c74c1 100644 --- a/lib/wsp/Peer.js +++ b/lib/wsp/Peer.js @@ -83,7 +83,7 @@ function Peer (url, options) { this.setMaxListeners(Infinity); this.options = options || {}; - if( !('wsc' in this.options ) ) this.options.wsc = options.wsc || { protocols: null }; + if( !('wsc' in this.options ) ) this.options.wsc = options.wsc || { protocols: null }; else if( !('protocols' in this.options.wsc) ) this.options.wsc.protocols = null; // Messages sent before the socket is ready.