Skip to content

fix(realtime): restart timeout after resending push - #1654

Open
hsusul wants to merge 1 commit into
supabase:mainfrom
hsusul:fix/realtime-resend-timeout
Open

hsusul wants to merge 1 commit into
supabase:mainfrom
hsusul:fix/realtime-resend-timeout

Conversation

@hsusul

@hsusul hsusul commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • clear a completed push timeout task before dispatching timeout callbacks
  • verify a resent push gets a fresh timeout window

Problem

After a push times out, AsyncPush.resend() sends it again but does not schedule another timeout because the completed task is still stored in timeout_task. For channel join retries, a second unacknowledged join can therefore leave the channel waiting indefinitely.

Solution

Release the timeout task reference when the timer fires so resend() can arm a new timer. This keeps cancellation behavior and the public API unchanged.

Tests

  • uv run --package realtime pytest src/realtime/tests/test_push.py src/realtime/tests/test_timer.py -q — 7 passed
  • make realtime.tests — mypy passed; 32 tests passed against the local Supabase stack
  • uv run ruff check src/realtime — passed
  • uv run ruff format --check src/realtime — passed
  • uv build --package realtime — passed
  • git diff --check — passed

Closes #1653

@olirice @silentworks

@hsusul
hsusul requested review from a team and o-santi as code owners September 20, 2026 04:09

This branch has not been deployed

No deployments
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.

Realtime push resends stop timing out after the first timeout

1 participant