Skip to content

fix(kad): confirm AddProvider sends via handler event and remove premature success#6196

Open
GarmashAlex wants to merge 2 commits intolibp2p:masterfrom
GarmashAlex:feat/kad-addprovider-sent-event
Open

fix(kad): confirm AddProvider sends via handler event and remove premature success#6196
GarmashAlex wants to merge 2 commits intolibp2p:masterfrom
GarmashAlex:feat/kad-addprovider-sent-event

Conversation

@GarmashAlex
Copy link
Copy Markdown

Add HandlerEvent::AddProviderSent and emit it when a one-way AddProvider request is successfully sent in the handler. Handle this event in the behaviour to progress the query for the sending peer. Remove the previous premature on_success on dispatch in
NetworkBehaviour::poll(). Also refactor Handler::poll() to remove a never-loop pattern flagged by clippy, keeping logic unchanged. This improves observability and correctness by acknowledging success only after the request is actually sent, while preserving existing error reporting.

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