Skip to content

3.1.0中RtuMaster的一个bug #78

Description

@zm2417

RtuMaster中的sendImpl方法中失败会执行closeConnection(conn);该方法会执行
public void removeConsumer() {
listener.stop();
listener = null;
}
问题在于 listener = null;
当我使用同一个RtuMaster类再次连接执行openConnection方法,他会先closeConnection(toClose)方法,又回去调用removeConsumer,这里没有判断listener是否为null,导致重连报错。

希望之后的版本能加入listener是否为null判断,或者是有什么其他的办法规避该问题?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions