X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fprotocol_plugins%2Fopenflow%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fprotocol_plugin%2Fopenflow%2Fcore%2Finternal%2FController.java;h=f183b516de5fb4de0b60a79618664c58108209e1;hb=53c4c25db41a16aa3d820e50657e143cbc177c8c;hp=e6289581bded8467ff94b53478be562ae7029025;hpb=29f7cfb54b580928c7feac63abce028a7014b0d5;p=controller.git diff --git a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/core/internal/Controller.java b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/core/internal/Controller.java index e6289581bd..f183b516de 100644 --- a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/core/internal/Controller.java +++ b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/core/internal/Controller.java @@ -154,7 +154,6 @@ public class Controller implements IController, CommandProvider { * */ public void stop() { - for (Iterator> it = switches.entrySet().iterator(); it .hasNext();) { Entry 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; } }