We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98c8516 commit 969510eCopy full SHA for 969510e
lib/client.js
@@ -406,10 +406,12 @@ class RPCClient extends EventEmitter {
406
this._connectPromise = (async () => {
407
this._wsAbortController = new AbortController();
408
409
- const wsOpts = structuredClone(this._options.wsOpts ?? {});
410
- wsOpts.noDelay = true;
411
- wsOpts.signal = this._wsAbortController.signal;
412
- wsOpts.headers = wsOpts.headers ?? {};
+ const wsOpts = Object.assign({}, {
+ // defaults
+ noDelay: true,
+ signal: this._wsAbortController.signal,
413
+ headers: {},
414
+ }, this._options.wsOpts ?? {});
415
416
Object.assign(wsOpts.headers, this._options.headers);
417
0 commit comments