Skip to content

Commit a73fa88

Browse files
committed
[feat] Update attach to allow https servers
1 parent d93ef6a commit a73fa88

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/engine.io.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*/
44

55
var http = require('http');
6+
var https = require('https');
67

78
/**
89
* Invoking the library as a function delegates to attach if the first argument
@@ -20,7 +21,8 @@ var http = require('http');
2021
exports = module.exports = function () {
2122
// backwards compatible use as `.attach`
2223
// if first argument is an http server
23-
if (arguments.length && arguments[0] instanceof http.Server) {
24+
if (arguments.length &&
25+
(arguments[0] instanceof http.Server || arguments[0] instanceof https.Server)) {
2426
return attach.apply(this, arguments);
2527
}
2628

0 commit comments

Comments
 (0)