Skip to content

Reconnection Issue #577

Open
Open

Description

@yorodm

I'm running on a Debian Bullseye container. The container has access to a rfcomm device on the host and I'm using a listener to detect if the connection is closed to try and reconnect the device. This works well up to a point when the program gets several disconnection events in a row and then freezes while trying to reconnect.

The reconnection mechanism just calls closePort waits a few seconds and tries to call openPort again

Running jconsole remotely shows that there's a live thread running waitForEvent so I assume the listener it's still registered in the SerialPort instance.

Activity

  1. hedgecrw commented on Nov 4, 2025

    @hedgecrw
    Contributor

    Depending on how you are doing your reconnection logic, I can see how it's possible for the waitForEvent loop to persist. I just made some updates to ensure that the loop exits if a disconnect event is detected. If you have the ability to test your code with the most recent SNAPSHOT version, that would be very helpful. Thanks!

  2. yorodm commented on Nov 15, 2025

    @yorodm
    Author

    Hi @hedgecrw , sadly I'm not longer involved with the project in question and I don't have access to the codebase.

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