提交 5c6111e0 编写于 作者: 如梦技术's avatar 如梦技术 🐛

🐛 修复 mica-mqtt client IMqttClientConnectListener onDisconnect 空指针。

上级 9a89b363
......@@ -104,6 +104,10 @@ public class MqttClientAioListener extends DefaultClientAioListener {
@Override
public void onBeforeClose(ChannelContext channelContext, Throwable throwable, String remark, boolean isRemove) {
// 先判断是否配置监听
if (connectListener == null) {
return;
}
try {
connectListener.onDisconnect(channelContext, throwable, remark, isRemove);
} catch (Throwable e) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册