-
-
Notifications
You must be signed in to change notification settings - Fork 739
feat: Add "Once" socket listener registration for one-time handlers #920
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
feat: Add "Once" socket listener registration for one-time handlers #920
Conversation
|
The commit d8062aa was made because the test "GetAllDisplays_returns_at_least_one" was failing due to a Json deserialization mismatch |
FlorianRappl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! LGTM!
|
Please have a look at this one @agracio. |
|
I can see that it is another major source of conflicts for my change but unable to comment on viability of I am assuming that there was some reason behind using |
That's my guess, too - but I must be blind to see that in the SocketIO GitHub source code ... For the OP question / discussion see #919 |
|
Source for the But honestly, it would change semantics. First, the lock in there is inconsistent (it locks when adding the event handler, but it does not lock when removing the handler). Second, the value is always set via a Long story short I am not sure if we should accept this. I think it's much better to do #918 and do the API right beforehand. |
|
There is nothing in changelog to indicate that |
Yeah it entered the code with the facade, i.e., with the recent rework / |
|
From logs I can see that it was moved during rework and previously was part of API folder and always included Once? |
|
SocketIOFacade.cs created on 23rd of March 2023 and added |
To be fair this is also true for Definitely struggling to judge what real life implications could be.
#918 focuses on removing ApiEventManager as well as moving some more of the tasks to use Major source of conflicts is complete removal of ApiEventManager as well as multiple changes to tasks that switched to using |
|
@FlorianRappl off topic for this PR but you mentioned messaging apps before, I am not on Gitter but available on Slack and Discord. |
softworkz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking all good to me!
…ration for one-time handlers
It looks like that, because my moving of files unfortunately broke the Git history of
|
This PR updates the socket listener handling to use the already existing
Oncemethod rather than manually adding and removing event handlers. This simplifies the code and reduces unnecessary listener cleanup logic while keeping the behavior the same.