Permalink
Browse files

Avoid unnecessary double-registration of http contexts/routes

  • Loading branch information...
lefou committed Oct 23, 2018
1 parent a38cbe2 commit 454d666aa17b70fb7f2c3df6bbbc6198d61d65ce
@@ -98,11 +98,6 @@ class RouteProvider {
case ServiceWatcherEvent.RemovedService(route, watchContext) => toContext(route, watchContext.ref).foreach(removeContext)
}
// Use all contexts that were registered before we came, too
log.debug("Registering already present HttpContext's and Route's")
services[HttpContext].foreach(addContext)
serviceRefs[Route].flatMap(r => toContext(bundleContext.getService(r), r)).foreach(addContext)
}
override def stop(): Unit = {
// We unregister all routes
@@ -115,4 +110,4 @@ class RouteProvider {
capsuleContext.addCapsule(capsule)
}
}
}

0 comments on commit 454d666

Please sign in to comment.