Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StreamTransport::removeConsumer方法bug #70

Open
l505654754 opened this issue May 13, 2024 · 0 comments
Open

StreamTransport::removeConsumer方法bug #70

l505654754 opened this issue May 13, 2024 · 0 comments

Comments

@l505654754
Copy link

使用RtuMaster发送消息只要发生异常就会关闭连接调用到这个方法,而下次尝试打开连接又会先调用这个方法产生空指针从而打开失败。导致永远都连不上,除非自己创建新的RtuMaster实例

package com.serotonin.modbus4j.sero.messaging;
public class StreamTransport implements Transport, Runnable {

...

    /**
     * <p>removeConsumer.</p>
     */
    public void removeConsumer() {
        listener.stop();
        listener = null;
    }

...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant