A cached message may be not sent and removed from the queue in long polling transport #57

flowersinthesand opened this Issue Feb 4, 2015 · 1 comment


None yet

1 participant


While processing https://github.com/vibe-project/vibe-protocol/blob/v3.0.0-Alpha11/lib/transport-http-server.js#L303-L321, active response may be used to send message by other thread. If that's the case, the retrieved message from the cache may be not sent again and lost. I'm not certain if it can happen in Node.js but noting this point would be helpful for others to implement server.

As a solution, response should be set to new one after sending a cached message. If there was a message in cache, new one would be null so response would be null. If not, new one would be assigned to response.

@flowersinthesand flowersinthesand added this to the 3.0.0-Alpha12 milestone Feb 4, 2015

The fix is little different with the above explained solution but anyway it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment