• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

redis / ioredis / 20717772074

05 Jan 2026 02:01PM UTC coverage: 89.02% (-1.8%) from 90.774%
20717772074

push

github

web-flow
feat: add timeout blocking commands (#2052)

* fix: add blockingTimeout option for blocking commands

* docs: update readme with blockingTimeout

* fix: resolve blocking commands with null on timeout instead of hanging

- Blocking commands (BLPOP, BRPOP, BZPOPMIN, XREAD, etc.) now resolve
  with `null` when their timeout expires without a response, matching
  Redis behavior and preventing indefinite hangs during undetectable
  network failures

- Added `blockingTimeout` option as a safety net for commands that
  block forever (timeout=0 / BLOCK 0)

- Automatically extracts and tracks timeout from command arguments,
  adding a 100ms grace period for finite timeouts

- Protects commands in both offline queue and command queue with
  absolute deadline tracking

- Simplified setBlockingTimeout API to resolve with null (no callback,
  no error rejection)

* refactor(command): move blocking timeout extraction to Command class

* fix: blocking timeout reamde and add more unit tests

* test: add more unit and functional tests

* feat: add configurable blockingTimeoutGrace option

---------

Co-authored-by: Pavel Pashov <pavel.pashov@redis.com>

1292 of 1509 branches covered (85.62%)

Branch coverage included in aggregate %.

92 of 96 new or added lines in 3 files covered. (95.83%)

114 existing lines in 5 files now uncovered.

2478 of 2726 relevant lines covered (90.9%)

11608.01 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

86.54
/lib/cluster/ConnectionPool.ts


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc