Repository navigation
fix(redis): subscriber watchdog - #52
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #52 +/- ##
===========================================
Coverage 100.00% 100.00%
- Complexity 164 166 +2
===========================================
Files 27 27
Lines 465 471 +6
===========================================
+ Hits 465 471 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
AFAIK no other command can reach the subscribe connection as soon as |
It does, integration suite proves it. Why do you think it doesn't ? redis-react is asynchronous, so subscribe() just writes SUBSCRIBE and returns a promise, and the client keeps accepting commands on that connection. Redis allows PING while subscribed and answers ["pong", ""]. |
|
I just re-check it on a real Redis
Redis allows It seems |
|
Found documentation on it for ping: https://redis.io/docs/latest/commands/ping/
|
|
LGTM :-) |
|
@bpolaszek, thanks ! Can you make a new release with this please ? |
|
Consider it done ✅ https://github.com/bpolaszek/freddie/releases/tag/0.5.1 |
The Redis transport opens two connections from the same DSN, one for commands and one for the pub/sub subscription. The periodic ping only reached the command connection, so a half-open subscription socket went unnoticed: the hub kept answering publish requests while every subscriber stopped receiving anything.
The ping now runs on both connections. Paired with a non-zero readTimeout it turns a silent socket into a rejected promise, which reaches Hub::die and lets the supervisor restart the hub.