Skip to content

Many calls to unsubscribe, subscribe cause Web Socket Net to stop receiving #450

@PetterVMC

Description

@PetterVMC

Hi!

In my current Unity simulation I need to unsubscribe during runtime based on application logic, and then later re-subscribe to the same topics again. This cycle can repeat many times.

I noticed that after unsubscribing / re-subscribing multiple times, I suddenly stopped receiving any messages at all (even on other topics that I permanently subscribed to). After some debugging, it I noticed that the RosSocket's function Receive() suddently stops being called entirely.

This problem only seems to happen if protocol is "Web Socket Net". The other protocol "Web Socket Sharp" seems to work fine.

Also, my Unity simulation subscribe to about 25 Float32, which are being published from an ubuntu ROS node at 100 Hz. If I lower the data amount or publish frequency the problem is less prone to happen (or does not happen at all).

Anyone having similar experiences, or any insight on if this could be an actual bug in the Web Socket Net protocol?

Unity version: 2022.3.13f1 (Windows 10)
ROS distribution: Melodic (Ubuntu 18.04)

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