Skip to content

Commit 73b2f11

Browse files
refactor: remove unused async attribute
The `async` flag was always true.
1 parent 2c16af3 commit 73b2f11

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/transports/polling.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,6 @@ export class Request extends Emitter<{}, {}, RequestReservedEvents> {
306306
private readonly opts: { xd; cookieJar: CookieJar } & SocketOptions;
307307
private readonly method: string;
308308
private readonly uri: string;
309-
private readonly async: boolean;
310309
private readonly data: string | ArrayBuffer;
311310

312311
private xhr: any;
@@ -329,7 +328,6 @@ export class Request extends Emitter<{}, {}, RequestReservedEvents> {
329328

330329
this.method = opts.method || "GET";
331330
this.uri = uri;
332-
this.async = false !== opts.async;
333331
this.data = undefined !== opts.data ? opts.data : null;
334332

335333
this.create();
@@ -359,7 +357,7 @@ export class Request extends Emitter<{}, {}, RequestReservedEvents> {
359357

360358
try {
361359
debug("xhr open %s: %s", this.method, this.uri);
362-
xhr.open(this.method, this.uri, this.async);
360+
xhr.open(this.method, this.uri, true);
363361
try {
364362
if (this.opts.extraHeaders) {
365363
xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);

0 commit comments

Comments
 (0)