commit | 1afdb3fa790deda169f7213f469bb5e4f62e4123 | [log] [tgz] |
---|---|---|
author | rohitsharan <r.sharan@samsung.com> | Mon Apr 17 21:16:13 2017 +0530 |
committer | rohitsharan <r.sharan@samsung.com> | Mon Apr 17 21:16:13 2017 +0530 |
tree | 29bd3b37fdcc0e93df1a888ce48cd87cbcb02143 | |
parent | be94db97c427039d3cb14e233f7954accc1db6c4 [diff] |
onos-6310:- avoid Null pointer in protocol TL1Controller method disconnectDevice Change-Id: I1e6cd1c7b63747978b1acb95bd56af40538e89bf
diff --git a/protocols/tl1/ctl/src/main/java/org/onosproject/tl1/impl/DefaultTl1Controller.java b/protocols/tl1/ctl/src/main/java/org/onosproject/tl1/impl/DefaultTl1Controller.java index 7a2fa8f..118c43f 100644 --- a/protocols/tl1/ctl/src/main/java/org/onosproject/tl1/impl/DefaultTl1Controller.java +++ b/protocols/tl1/ctl/src/main/java/org/onosproject/tl1/impl/DefaultTl1Controller.java
@@ -211,9 +211,9 @@ Channel channel = device.channel(); if (channel != null) { channel.close(); + msgMap.remove(channel); } - msgMap.remove(channel); device.disconnect(); tl1Listeners.forEach(l -> l.deviceDisconnected(deviceId)); }