Skip to content

Revoked authentication does not work for multiple streams #2754

Closed

Description

@hampuslavin

Describe the bug
When revoking authentication for a user that has multiple streams open only the first stream will be closed. This is due to the fact that the revoked authentication event removes its own handler in the event callback, resulting in the following error:

Concurrent modification during iteration: _Set len:0.
#0      _CompactIterator.moveNext (dart:collection-patch/compact_hash.dart:714:7)
#1      MessageCentral.postMessage (package:serverpod/src/server/message_central.dart:61:28)

To Reproduce
Steps to reproduce the behavior:

  1. Start two streams with a single user
  2. Revoke access for the user
  3. Only the first stream connection is revoked and closed, the second still lives

Expected behavior
Both stream should be closed. Simply fixing the callback handlers iteration should fix this issue.

Activity

  1. added
    bug
    on Sep 18, 2024
  2. changed the title [-]revoked authentication does not work for multiple streams[/-] [+]Revoked authentication does not work for multiple streams[/+] on Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions