import java.util.Arrays;
+import org.opendaylight.openflowplugin.ConnectionException;
import org.opendaylight.openflowplugin.openflow.md.core.session.SessionContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
sessionKeyId = Arrays.toString(sessionContext.getSessionKey().getId());
}
- LOG.error("exception -> {}, session -> {}", e.getMessage(), sessionKeyId, e);
+ if (e instanceof ConnectionException) {
+ LOG.warn("exception -> {}, session -> {}", e.getMessage(), sessionKeyId, e);
+ } else {
+ LOG.error("exception -> {}, session -> {}", e.getMessage(), sessionKeyId, e);
+ }
}
}
import java.util.concurrent.TimeoutException;
import org.opendaylight.openflowjava.protocol.api.connection.ConnectionAdapter;
+import org.opendaylight.openflowplugin.ConnectionException;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesInputBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesOutput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.HelloInput;
RpcUtil.smokeRpc(helloResult);
LOG.debug("FIRST HELLO sent.");
} catch (Exception e) {
- LOG.debug("FIRST HELLO sending failed.");
- throw e;
+ if (LOG.isTraceEnabled()) {
+ LOG.trace("FIRST HELLO sent.", e);
+ }
+ throw new ConnectionException("FIRST HELLO sending failed because of connection issue.");
}
}