mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix: do not drop sub protocol messages during EthStream Handshake (#9086)
This commit is contained in:
@ -1006,10 +1006,7 @@ async fn authenticate_stream(
|
||||
(eth_stream.into(), their_status)
|
||||
} else {
|
||||
// Multiplex the stream with the extra protocols
|
||||
let (mut multiplex_stream, their_status) = RlpxProtocolMultiplexer::new(p2p_stream)
|
||||
.into_eth_satellite_stream(status, fork_filter)
|
||||
.await
|
||||
.unwrap();
|
||||
let mut multiplex_stream = RlpxProtocolMultiplexer::new(p2p_stream);
|
||||
|
||||
// install additional handlers
|
||||
for handler in extra_handlers.into_iter() {
|
||||
@ -1022,6 +1019,19 @@ async fn authenticate_stream(
|
||||
.ok();
|
||||
}
|
||||
|
||||
let (multiplex_stream, their_status) =
|
||||
match multiplex_stream.into_eth_satellite_stream(status, fork_filter).await {
|
||||
Ok((multiplex_stream, their_status)) => (multiplex_stream, their_status),
|
||||
Err(err) => {
|
||||
return PendingSessionEvent::Disconnected {
|
||||
remote_addr,
|
||||
session_id,
|
||||
direction,
|
||||
error: Some(PendingSessionHandshakeError::Eth(err)),
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
(multiplex_stream.into(), their_status)
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user