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.
Fixes #57 response should be set when it is really available
The fix is little different with the above explained solution but anyway it works.
Use if-else instead of return to improve readability #57
Use definite variable name for readiability #57