commit | 39e2023c6cdfe7e9a990cbd30298285db49c6ffb | [log] [tgz] |
---|---|---|
author | Jonathan Hart <jono@opennetworking.org> | Mon Jan 29 16:02:41 2018 -0800 |
committer | Thomas Vachuska <tom@opennetworking.org> | Thu Feb 01 09:26:02 2018 -0800 |
tree | b21f0fb47da4e7590173a87434c849d6dfa67f20 | |
parent | 43ae498013b55033659da660bde013d40f30920c [diff] |
Don't try and write an empty list of OF messages Change-Id: Ic18971cd0b4b019906d2bdcbe9aef627f79065f7
diff --git a/protocols/openflow/api/src/main/java/org/onosproject/openflow/controller/driver/AbstractOpenFlowSwitch.java b/protocols/openflow/api/src/main/java/org/onosproject/openflow/controller/driver/AbstractOpenFlowSwitch.java index 24a51b6..3b38f48 100644 --- a/protocols/openflow/api/src/main/java/org/onosproject/openflow/controller/driver/AbstractOpenFlowSwitch.java +++ b/protocols/openflow/api/src/main/java/org/onosproject/openflow/controller/driver/AbstractOpenFlowSwitch.java
@@ -327,7 +327,7 @@ this.agent.transitionToMasterSwitch(dpid); synchronized (messagesPendingMastership) { List<OFMessage> messages = messagesPendingMastership.get(); - if (messages != null) { + if (messages != null && !messages.isEmpty()) { // Cannot use sendMsg here. It will only append to pending list. sendMsgsOnChannel(messages); log.debug("Sending {} pending messages to switch {}",