ONOS-6658 Remove host listener when deactivating SR

Change-Id: Ie65650b61873e2539ba77d55ff7daeb0a559b5b9
diff --git a/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java b/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
index 6bacfce..c61d5c9 100644
--- a/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
+++ b/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
@@ -386,11 +386,10 @@
         linkService.addListener(linkListener);
         deviceService.addListener(deviceListener);
         multicastRouteService.addListener(mcastListener);
+        routeService.addListener(routeListener);
 
         cfgListener.configureNetwork();
 
-        routeService.addListener(routeListener);
-
         log.info("Started");
     }
 
@@ -420,6 +419,7 @@
         cfgService.unregisterConfigFactory(mcastConfigFactory);
         cfgService.unregisterConfigFactory(pwaasConfigFactory);
 
+        hostService.removeListener(hostListener);
         packetService.removeProcessor(processor);
         linkService.removeListener(linkListener);
         deviceService.removeListener(deviceListener);