Skip to content

Both realtime channel closes when subscribing to a channel that already exists #237

Open
@dshukertjr

Description

@dshukertjr

Describe the bug
When listening to a channel that already has a subscription, both the first subscription and the second subscription closes. With the js library, only the first one closes and the second one remains connected.

To Reproduce
Steps to reproduce the behavior:

  1. Subscribe to the same channel twice
  supabase.channel('channel').on(...).subscribe(); // This one closes
  supabase.channel('channel').on(...).subscribe(); // This one also closes, but should actually remain connected.

Expected behavior
The last connection made to the same channel should remain connected.

supabase_flutter version:

  • Version [e.g. 1.0.0-dev.9]

Additional context
Also, it is not very apparent that you can only have 1 connection per channel. Maybe we can add more commented docs about it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrealtimeThis issue or pull request is related to realtime

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions