Skip to content

Commit 7699a1e

Browse files
Report a remote's protocols to other handlers
1 parent e536dea commit 7699a1e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

protocols/identify/src/handler.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,10 @@ impl Handler {
187187
) {
188188
match output {
189189
future::Either::Left(remote_info) => {
190+
self.events
191+
.push(ConnectionHandlerEvent::ReportRemoteProtocols {
192+
protocols: remote_info.protocols.clone(),
193+
});
190194
self.events
191195
.push(ConnectionHandlerEvent::Custom(Event::Identified(
192196
remote_info,
@@ -307,6 +311,10 @@ impl ConnectionHandler for Handler {
307311
self.inbound_identify_push.take();
308312

309313
if let Ok(info) = res {
314+
self.events
315+
.push(ConnectionHandlerEvent::ReportRemoteProtocols {
316+
protocols: info.protocols.clone(),
317+
});
310318
return Poll::Ready(ConnectionHandlerEvent::Custom(Event::Identified(info)));
311319
}
312320
}

0 commit comments

Comments
 (0)