diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -149,10 +149,10 @@ Server.prototype.origins = function(v){
   this._origins = v;
   var self = this;
   if (!this.eio) return;
-  this.eio.allowRequest = function(req) {
+  this.eio.allowRequest = function(req, fn) {
     var origin = req.headers.origin || req.headers.referer;
     if (origin === 'null') origin = '*';
-    if (self._origins.indexOf('*:*') !== -1) return true;
+    if (self._origins.indexOf('*:*') !== -1) return fn(null, true);
     if (origin) {
       try {
         var parts = url.parse(origin);
@@ -161,11 +161,11 @@ Server.prototype.origins = function(v){
           ~self._origins.indexOf(parts.hostname + ':' + parts.port) ||
           ~self._origins.indexOf(parts.hostname + ':*') ||
           ~self._origins.indexOf('*:' + parts.port);
-        return !!ok;
+        return fn(null, !!ok);
       } catch (ex) {
       }
     }
-    return false;
+    fn(null, false);
   };
 
   return this;
Switched to async allowRequest callback in engine.io for setting the allowed origins