Skip to content

Commit

Permalink
fix: restore the cherry-picking of the WebSocket options
Browse files Browse the repository at this point in the history
The previous commit ([1]) makes the Engine.IO tests with Node.js SSL
options fail.

[1]: 177b95f
  • Loading branch information
darrachequesne committed Nov 17, 2020
1 parent 8228a43 commit 4873a23
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion lib/transports/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,21 @@ class WS extends Transport {
const protocols = this.opts.protocols;

// React Native only supports the 'headers' option, and will print a warning if anything else is passed
const opts = isReactNative ? {} : this.opts;
const opts = isReactNative
? {}
: pick(
this.opts,
"agent",
"perMessageDeflate",
"pfx",
"key",
"passphrase",
"cert",
"ca",
"ciphers",
"rejectUnauthorized",
"localAddress"
);

if (this.opts.extraHeaders) {
opts.headers = this.opts.extraHeaders;
Expand Down

0 comments on commit 4873a23

Please sign in to comment.