-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
Description
Summary
I’m currently evaluating Redis+Socket.io and I’m coming across a situation where my
message event handlers stop firing events. I was seeing this after leaving my node.js server
running for a few hours, but now I can always reproduce by publishing a malformatted
message to my Redis server. My work around is to restart my server which is far from
ideal.
Steps to Reproduce
- Download this code: https://gist.github.com/3293884
- Setup a local Redis instance.
- Run the downloaded code in node.js
- Send “publish football.match.event foo” to the redis instance.
- Send “publish football.match.event "{"foo":"bar"}"” to the redis instance.
- Send “publish football.match.event foo” to the redis instance.
Expected Results
The client error handler (line #9) should fire 3 times so I should see this error
repeated 3 times in my logs.
error event - localhost:6379 - SyntaxError: Unexpected token o
Actual Results
I see the above mentioned error message only once. doMessageListen() is never called again.
Notes:
I have redis.debug_mode set to true. When I publish the messages I can see them in my
redis debugging. The following output appears twice in my logs.
net read localhost:6379 id 1: *3
$7
message
$20
football.match.event
$3
foo