Skip to content

Commit

Permalink
fix: fix server attachment (#4127)
Browse files Browse the repository at this point in the history
The check excluded an HTTPS server from being properly attached.

Related: #4124
  • Loading branch information
HexaField committed Oct 16, 2021
1 parent 95810aa commit 0ef2a4d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/index.ts
Expand Up @@ -156,9 +156,7 @@ export class Server<
this.adapter(opts.adapter || Adapter);
this.sockets = this.of("/");
this.opts = opts;
if (srv instanceof http.Server || typeof srv === "number") {
this.attach(srv);
}
if (srv || typeof srv == "number") this.attach(srv as http.Server | number);
}

/**
Expand Down

0 comments on commit 0ef2a4d

Please sign in to comment.