Skip to content

[Websocket] Messages duplication after modification #150

@nioc

Description

@nioc

Hello,

After modifying the WS node (the Unifi url, for example) and redeploying, messages are sent twice, as we use the wslogin function with a timeout.

    node.tout = setTimeout(function () {
        node.status(STATUS_CONNECTING);
        wslogin();
    }, 5000);

The user must then restart Node-RED to clean up the previous event listeners.

Another problem I've encountered is that error handling sends the msg variable with the error in the according attribute, but if there was a previous onMessage event, the error also transmits it on.

I propose a fix in the Websocket refactoring of request #149 (which concerned WS functional improvements).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions