Skip to content

Disconnected agent causes invalid_state_err #14

Open
@bensheldon

Description

@bensheldon

(sorry to open this ticket, but I'm not sure if this is a problem on my setup or with push-it...)

Node throws an invalid_state_err when trying to send a message after refreshing the browser window. I think something isn't properly clearing the list of connected agents (i.e. trying to send to a disconnected agent), but I'm not entirely sure.

This is nodejs's console.log:

connected agent: SeKhwfqBtwYspYaveEn5B8
Agent.id(SeKhwfqBtwYspYaveEn5B8) sent message.uuid(_8iRNza40f0ANcyQ_T-yyS)
**REFRESH BROWSER**
connected agent: LaJPvL75EkCD3xJZVeEd_K
Agent.id(LaJPvL75EkCD3xJZVeEd_K) sent message.uuid(S9U-dlf8jun9DmtxqVUlPu)
disconnected agent: SeKhwfqBtwYspYaveEn5B8
Agent.id(LaJPvL75EkCD3xJZVeEd_K) sent message.uuid(LeA-VK048e0xY_XzpIO_2h)

node.js:134
        throw e; // process.nextTick error, or 'error' event on first tick
        ^
Error: INVALID_STATE_ERR
    at Error (unknown source)
    at Session.send (/Users/SlicedBread/node_modules/push-it/node_modules/sockjs/lib/transport.js:124:15)
    at Agent.send (/Users/SlicedBread/node_modules/push-it/server/models/agent.js:33:17)
    at Object.received (/Users/SlicedBread/node_modules/push-it/server/mqs/subscription_manager.js:34:26)
    at Object.callback (/Users/SlicedBread/node_modules/push-it/server/mqs/subscription_manager.js:25:12)
    at Array.<anonymous> (/Users/SlicedBread/node_modules/push-it/server/mqs/in_memory.js:47:18)
    at EventEmitter._tickCallback (node.js:126:26)

Thanks for the help and please let me know if I can better further describe the issue or help replicate it.

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