Skip to content

Commit 0ef2a4d

Browse files
authoredOct 16, 2021
fix: fix server attachment (#4127)
The check excluded an HTTPS server from being properly attached. Related: #4124
1 parent 95810aa commit 0ef2a4d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed
 

‎lib/index.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,7 @@ export class Server<
156156
this.adapter(opts.adapter || Adapter);
157157
this.sockets = this.of("/");
158158
this.opts = opts;
159-
if (srv instanceof http.Server || typeof srv === "number") {
160-
this.attach(srv);
161-
}
159+
if (srv || typeof srv == "number") this.attach(srv as http.Server | number);
162160
}
163161

164162
/**

0 commit comments

Comments
 (0)
Please sign in to comment.