diff --git a/lib/engine.io.js b/lib/engine.io.js index 2a211c2b2..c34cd6959 100644 --- a/lib/engine.io.js +++ b/lib/engine.io.js @@ -3,6 +3,7 @@ */ var http = require('http'); +var https = require('https'); /** * Invoking the library as a function delegates to attach if the first argument @@ -20,7 +21,8 @@ var http = require('http'); exports = module.exports = function () { // backwards compatible use as `.attach` // if first argument is an http server - if (arguments.length && arguments[0] instanceof http.Server) { + if (arguments.length && + (arguments[0] instanceof http.Server || arguments[0] instanceof https.Server)) { return attach.apply(this, arguments); }