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

supabase / supabase-flutter / 28533730781
86%

Build:
DEFAULT BRANCH: main
Ran 01 Jul 2026 04:53PM UTC
Jobs 8
Files 0
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
28533730781

push

github

web-flow
fix(realtime): cancel pending reconnect on disconnect after a dropped socket (#1477)

## What

Fixes three related problems in `RealtimeClient` around a socket that
dropped unexpectedly:

1. `disconnect()` now always cancels a pending reconnect, so
disconnecting after the socket has already dropped no longer silently
reopens the connection.
2. Automatic reconnects keep their exponential backoff instead of
resetting to the shortest delay on every attempt.
3. A manual `connect()` after an unexpected drop now actually reconnects
instead of being a no-op.

## Why

When the socket drops unexpectedly, `_onConnClose` sets `connState =
closed` and schedules a reconnect through
`reconnectTimer.scheduleTimeout()`. `conn` is not nulled on a drop, so a
later `disconnect()` still enters the `conn != null` branch, but
`oldState == closed` makes `shouldCloseSink` false, so the close block
that cancelled the timer was skipped. `conn` was nulled and the method
returned, yet the armed backoff timer still fired, ran `_reconnect()`
and reopened a connection the user explicitly closed.

Cancelling the timer on every `disconnect()` fixes that, but it cannot
use `reconnectTimer.reset()`: the reconnect path is `_reconnect ->
disconnect -> connect`, so `reset()` would zero the retry counter on
every attempt and defeat exponential backoff. During an outage the
client would hammer an unreachable server at the shortest interval
instead of backing off. A new `RetryTimer.cancel()` cancels the
scheduled timer without touching the retry counter, so a user disconnect
still stops a pending reconnect while automatic reconnects keep backing
off. The counter is still zeroed on a successful open through `reset()`
in `_onConnOpen`.

Finally, because `conn` is intentionally kept non-null after a drop so
`conn.closeCode` and `conn.closeReason` stay readable, the `if (conn !=
null) return` guard in `connect()` treated the dead channel as a live
connection and turned a manual `connect()` into ... (continued)
Jobs
ID Job ID Ran Files Coverage
6 supabase - 28533730781.6 01 Jul 2026 04:53PM UTC 15
81.8
GitHub Action Run
7 realtime_client - 28533730781.7 01 Jul 2026 04:55PM UTC 11
88.44
GitHub Action Run
8 supabase_flutter - 28533730781.8 01 Jul 2026 04:54PM UTC 11
79.26
GitHub Action Run
7 gotrue - 28525677261.7 01 Jul 2026 02:43PM UTC 27
84.74
GitHub Action Run
4 postgrest - 28433368938.4 30 Jun 2026 09:14AM UTC 9
84.29
GitHub Action Run
8 storage_client - 28533236058.8 01 Jul 2026 04:46PM UTC 5
92.98
GitHub Action Run
3 yet_another_json_isolate - 28433368938.3 30 Jun 2026 09:12AM UTC 1
79.03
GitHub Action Run
7 functions_client - 28444889808.7 30 Jun 2026 12:39PM UTC 2
98.57
GitHub Action Run
Source Files on build 28533730781
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #28533730781
  • b704932a on github
  • Prev Build on main (#28533236058)
  • Next Build on main (#28536394514)
  • Delete
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