mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-21 05:44:44 +00:00
Deactivate RPC Connection Handler after goodbye message is sent (#5250)
* Deactivate RPC Connection Handler after goodbye message is sent * nit: use to_string instead of format * Merge branch 'unstable' of https://github.com/sigp/lighthouse into rpc-shutdown-improvement * clippy * Fix cargo.lock * Merge latest unstable
This commit is contained in:
@@ -223,7 +223,7 @@ where
|
||||
|
||||
fn handle_established_inbound_connection(
|
||||
&mut self,
|
||||
_connection_id: ConnectionId,
|
||||
connection_id: ConnectionId,
|
||||
peer_id: PeerId,
|
||||
_local_addr: &libp2p::Multiaddr,
|
||||
_remote_addr: &libp2p::Multiaddr,
|
||||
@@ -238,9 +238,9 @@ where
|
||||
},
|
||||
(),
|
||||
);
|
||||
// NOTE: this is needed because PeerIds have interior mutability.
|
||||
let peer_repr = peer_id.to_string();
|
||||
let log = self.log.new(slog::o!("peer_id" => peer_repr));
|
||||
let log = self
|
||||
.log
|
||||
.new(slog::o!("peer_id" => peer_id.to_string(), "connection_id" => connection_id.to_string()));
|
||||
let handler = RPCHandler::new(
|
||||
protocol,
|
||||
self.fork_context.clone(),
|
||||
@@ -253,7 +253,7 @@ where
|
||||
|
||||
fn handle_established_outbound_connection(
|
||||
&mut self,
|
||||
_connection_id: ConnectionId,
|
||||
connection_id: ConnectionId,
|
||||
peer_id: PeerId,
|
||||
_addr: &libp2p::Multiaddr,
|
||||
_role_override: libp2p::core::Endpoint,
|
||||
@@ -269,9 +269,10 @@ where
|
||||
(),
|
||||
);
|
||||
|
||||
// NOTE: this is needed because PeerIds have interior mutability.
|
||||
let peer_repr = peer_id.to_string();
|
||||
let log = self.log.new(slog::o!("peer_id" => peer_repr));
|
||||
let log = self
|
||||
.log
|
||||
.new(slog::o!("peer_id" => peer_id.to_string(), "connection_id" => connection_id.to_string()));
|
||||
|
||||
let handler = RPCHandler::new(
|
||||
protocol,
|
||||
self.fork_context.clone(),
|
||||
|
||||
Reference in New Issue
Block a user