diff --git a/lib/transports/websocket.js b/lib/transports/websocket.js index de590bc51..f9c4b7a46 100644 --- a/lib/transports/websocket.js +++ b/lib/transports/websocket.js @@ -92,19 +92,23 @@ WS.prototype.doOpen = function () { var uri = this.uri(); var protocols = this.protocols; - var opts = { - agent: this.agent, - perMessageDeflate: this.perMessageDeflate - }; - // SSL options for Node.js client - opts.pfx = this.pfx; - opts.key = this.key; - opts.passphrase = this.passphrase; - opts.cert = this.cert; - opts.ca = this.ca; - opts.ciphers = this.ciphers; - opts.rejectUnauthorized = this.rejectUnauthorized; + var opts = {}; + + if (!this.isReactNative) { + opts.agent = this.agent; + opts.perMessageDeflate = this.perMessageDeflate; + + // SSL options for Node.js client + opts.pfx = this.pfx; + opts.key = this.key; + opts.passphrase = this.passphrase; + opts.cert = this.cert; + opts.ca = this.ca; + opts.ciphers = this.ciphers; + opts.rejectUnauthorized = this.rejectUnauthorized; + } + if (this.extraHeaders) { opts.headers = this.extraHeaders; }