Closed Katekko closed 2 days ago
@Isakdl can you confirm for me?
@Katekko is it duplicating the stream itself or the items within the stream?
@Katekko is it duplicating the stream itself or the items within the stream?
The stream. Instead removing the stream in the client, its adding the same listener in the dispose method. I guess this need to be the remove instead the add
Let me clarify what I meant earlier. The issue isn't with the stream itself but with the duplication of the listener. Specifically, another listener is being added in the dispose method, even though a listener is already added when the StreamingConnectionHandler is created. If the listener wasn't added in the constructor, then the dispose method shouldn't be responsible for adding it either.
I created a pull request to address this issue by changing the line to remove the listener: https://github.com/serverpod/serverpod/pull/2287
Describe the bug Trying to dispose a StreamingConnectionHandler, line 55 its adding another _onConnectionStatusChanged, I don't think this is right. I was trying to dipose all the elements in my controller but it keep duplicating my streams and I found out why.
Lemme know if this is the expected, if is not, I will create a PR to fix this (changing to removeStreamingConnection)
To Reproduce Steps to reproduce the behavior:
Expected behavior Maybe remove the stream from client?
Serverpod versions
Platform information I'm running in windows