mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-13 18:11:22 +00:00
protocols/identify: Emit Push event after successful identification push (#2030)
This commit is contained in:
@ -79,6 +79,8 @@ pub struct IdentifyHandler {
|
||||
pub enum IdentifyHandlerEvent {
|
||||
/// We obtained identification information from the remote.
|
||||
Identified(IdentifyInfo),
|
||||
/// We actively pushed our identification information to the remote.
|
||||
IdentificationPushed,
|
||||
/// We received a request for identification.
|
||||
Identify(ReplySubstream<NegotiatedSubstream>),
|
||||
/// Failed to identify the remote.
|
||||
@ -149,7 +151,8 @@ impl ProtocolsHandler for IdentifyHandler {
|
||||
IdentifyHandlerEvent::Identified(remote_info)));
|
||||
self.keep_alive = KeepAlive::No;
|
||||
}
|
||||
EitherOutput::Second(()) => {}
|
||||
EitherOutput::Second(()) => self.events.push(
|
||||
ProtocolsHandlerEvent::Custom(IdentifyHandlerEvent::IdentificationPushed))
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user