Commits

Bob Bergman  committed 7d4347a

Clean up reg code after race fix

  • Participants
  • Parent commits 556114c

Comments (0)

Files changed (1)

File lib/internal/registration.js

           self.deregister().then(exit, exit);
         });
       }
-      return Q.allResolved(hosts.map(_.bind(register, self))).then(
-        function (promises) {
-          promises.forEach(function (promise) {
-            var host = promise.valueOf();
-            // if (host) {
-            //   self.on("remote_plugin_installed", function (key, settings) {
-            //     // If more than one host is defined, the following logic fails...
-            //     console.log(host, settings.baseUrl)
-            //     if (urls.parse(host).hostname === urls.parse(settings.baseUrl).hostname) {
-            //       self.logger.info("Registered with " + settings.baseUrl + ".");
-            //       self._registrations[host] = settings.clientKey;
-            //       // @todo unsubscribe this webhook listener
-            //     }
-            //   });
-            // }
-          });
-        },
-        function () {
-          self.logger.error.apply(self.logger, arguments);
-        }
-      );
+      hosts.forEach(_.bind(register, self));
     }
-    return Q.resolve();
   });
 };
 
 }
 
 function stripTrailingSlash(str) {
-    if(str.substr(-1) == '/') {
-        return str.substr(0, str.length - 1);
-    }
-    return str;
+  if(str.substr(-1) == '/') {
+    return str.substr(0, str.length - 1);
+  }
+  return str;
 }
 
 function stripCredentials(url) {