Use isConnected rather than isWriteable to detemine if we can send to switch
Fixes ONOS-2426. Change-Id: I1ccb6a599098a445b198f95a6223cef5671fd2e1
Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -96,14 +96,14 @@ public abstract class AbstractOpenFlowSwitch extends AbstractHandlerBehaviour | ... | @@ -96,14 +96,14 @@ public abstract class AbstractOpenFlowSwitch extends AbstractHandlerBehaviour |
96 | 96 | ||
97 | @Override | 97 | @Override |
98 | public final void sendMsg(OFMessage m) { | 98 | public final void sendMsg(OFMessage m) { |
99 | - if (role == RoleState.MASTER && channel.isWritable()) { | 99 | + if (role == RoleState.MASTER && channel.isConnected()) { |
100 | channel.write(Collections.singletonList(m)); | 100 | channel.write(Collections.singletonList(m)); |
101 | } | 101 | } |
102 | } | 102 | } |
103 | 103 | ||
104 | @Override | 104 | @Override |
105 | public final void sendMsg(List<OFMessage> msgs) { | 105 | public final void sendMsg(List<OFMessage> msgs) { |
106 | - if (role == RoleState.MASTER && channel.isWritable()) { | 106 | + if (role == RoleState.MASTER && channel.isConnected()) { |
107 | channel.write(msgs); | 107 | channel.write(msgs); |
108 | } | 108 | } |
109 | } | 109 | } | ... | ... |
-
Please register or login to post a comment