Skip to content

fix(redis): require ready client before commands#3696

Merged
RSO merged 1 commit into
mainfrom
innovative-brain
Jun 3, 2026
Merged

fix(redis): require ready client before commands#3696
RSO merged 1 commit into
mainfrom
innovative-brain

Conversation

@RSO
Copy link
Copy Markdown
Contributor

@RSO RSO commented Jun 3, 2026

Summary

  • Require the Redis client to be fully ready before reusing it for commands, avoiding stale open-but-not-ready sockets on Vercel instances.
  • Reset the shared connect promise after connect attempts complete so future disconnected clients can reconnect cleanly.

Verification

N/A - server helper change; no manual runtime verification performed.

Visual Changes

N/A

Reviewer Notes

This is intentionally minimal: it preserves the existing Redis timeout and Sentry behavior while tightening the readiness check.

@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented Jun 3, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Both changes are correct: isReady properly gates commands on a fully connected client, and moving connectPromise = null to .finally() ensures the reconnect path works after a successful connection is later lost.

Files Reviewed (1 file)
  • apps/web/src/lib/redis.ts

Reviewed by claude-4.6-sonnet-20260217 · 272,542 tokens

Review guidance: REVIEW.md from base branch main

@RSO RSO enabled auto-merge (squash) June 3, 2026 12:48
@RSO RSO merged commit 33ea5df into main Jun 3, 2026
16 checks passed
@RSO RSO deleted the innovative-brain branch June 3, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants