Merge "Web UI Branding support This fix provides an extensible branding support with...
[controller.git] / opendaylight / protocol_plugins / openflow / src / main / java / org / opendaylight / controller / protocol_plugin / openflow / core / internal / Controller.java
index e6289581bded8467ff94b53478be562ae7029025..f183b516de5fb4de0b60a79618664c58108209e1 100644 (file)
@@ -154,7 +154,6 @@ public class Controller implements IController, CommandProvider {
      *
      */
     public void stop() {
-
         for (Iterator<Entry<Long, ISwitch>> it = switches.entrySet().iterator(); it
                 .hasNext();) {
             Entry<Long, ISwitch> entry = it.next();
@@ -162,7 +161,11 @@ public class Controller implements IController, CommandProvider {
             it.remove();
         }
         switchEventThread.interrupt();
-        controllerIO.shutDown();
+        try {
+               controllerIO.shutDown();
+        } catch (IOException ex) {
+               logger.error("Caught exception: " + ex + " during stop");
+        }
     }
 
     /**
@@ -227,8 +230,6 @@ public class Controller implements IController, CommandProvider {
             switchHandler.start();
             logger.info(instanceName + " connected: " + sc.toString());
         } catch (IOException e) {
-            logger
-                    .error("Caught I/O Exception when trying to accept a new connection");
             return;
         }
     }