Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: support elysia 0.7 #10

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

amokio
Copy link

@amokio amokio commented Sep 29, 2023

I believe only one subscription per Client is supported before, and only work for single client.

example:

client1 -> subscribe -> test {id: 1, method: "subscription",…}
client1 -> subscribe -> test2 {id: 2, method: "subscription",…}
client2 -> subscribe -> test {id: 1, method: "subscription",…}
client2 -> subscribe -> test {id: 2, method: "subscription",…}

Client2 will override Client1 Unsubscribable object.
observers { 1: Unsubscribable, 2: Unsubscribable }, Here may have memory leak and the observer still listener on event emitter.

proposed data structure :

{
  "[socket.id]": { "[id]": Unsubscribable }
}

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.

1 participant