Skip to content
Snippets Groups Projects
Commit 0d36d755 authored by Mandeep Dhami's avatar Mandeep Dhami
Browse files

Added check for flush() being called with no messages having been sent

parent ead2d589
No related branches found
No related tags found
No related merge requests found
......@@ -425,7 +425,7 @@ public class OFSwitchImpl implements IOFSwitch {
public void flush() {
Map<OFSwitchImpl,List<OFMessage>> msg_buffer_map = local_msg_buffer.get();
List<OFMessage> msglist = msg_buffer_map.get(this);
if (msglist.size() > 0) {
if ((msglist != null) && (msglist.size() > 0)) {
try {
this.write(msglist);
} catch (IOException e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment