FELIX-5199 : Race condition in HttpServiceFactory.getService() causing exception

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1736278 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceFactory.java b/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceFactory.java
index 503c476..1de4b37 100644
--- a/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceFactory.java
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceFactory.java
@@ -111,9 +111,8 @@
         this.sharedHttpService = new SharedHttpServiceImpl(handlerRegistry);
 
         final String[] ifaces = new String[] { HttpService.class.getName(), ExtHttpService.class.getName() };
-        this.httpServiceReg = bundleContext.registerService(ifaces, this, this.httpServiceProps);
-
         this.active = true;
+        this.httpServiceReg = bundleContext.registerService(ifaces, this, this.httpServiceProps);
     }
 
     public void stop()