Skip to content

[Tmds.DBus.Protocol] Don't respond on any method_call - #211

Closed
shimr12 wants to merge 2 commits into
tmds:mainfrom
shimr12:main
Closed

[Tmds.DBus.Protocol] Don't respond on any method_call#211
shimr12 wants to merge 2 commits into
tmds:mainfrom
shimr12:main

Conversation

@shimr12

@shimr12 shimr12 commented Oct 5, 2023

Copy link
Copy Markdown

Mostly for a use case of working as a monitor after calling BecomeMonitor.

Responding for these messages as a monitor isn't allowed and causes the dbus service to disconnect us

@tmds

tmds commented Nov 17, 2023

Copy link
Copy Markdown
Owner

@shimr12 sorry for the unresponsiveness. It's been a busy few weeks for me, but it should be a bit calmer now.

What do you think about adding a BecomeMonitorAsync to Connection

Its signature would be something like:

ValueTask BecomeMonitorAsync(
    IEnumerable<MatchRule>? rules,
    Action<Exception?, Message, object?> handler,
    object? handlerState = null,
    bool emitOnCapturedContext = true);

Would that be usable for you?

If it looks good, do you want to implement it, or do you prefer I look into it?

The implementation would include no longer replying to messages when this method got called.

@shimr12

shimr12 commented Nov 28, 2023

Copy link
Copy Markdown
Author

not sure I will find time to do these changes in the next weeks, so would prefer if you could add this change :)

@tmds

tmds commented Dec 22, 2023

Copy link
Copy Markdown
Owner

Closing in favor of #217.

@tmds tmds closed this Dec 22, 2023
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.

2 participants