Skip to content

Commit

Permalink
get rid of unwrap
Browse files Browse the repository at this point in the history
  • Loading branch information
fgimenez committed Jun 25, 2024
1 parent bb04772 commit ce008f3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion crates/net/network/src/session/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,17 @@ async fn authenticate_stream(
}

let (multiplex_stream, their_status) =
multiplex_stream.into_eth_satellite_stream(status, fork_filter).await.unwrap();
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)
};
Expand Down

0 comments on commit ce008f3

Please sign in to comment.