File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -394,6 +394,10 @@ impl ConnectionManager {
394
394
addr : & SocketAddr ,
395
395
network_message : NetworkMessage ,
396
396
) -> ConnectionManagerResult < ( ) > {
397
+ self . metrics
398
+ . bitcoin_messages_sent
399
+ . with_label_values ( & [ network_message. cmd ( ) ] )
400
+ . inc ( ) ;
397
401
let conn = self . get_connection ( addr) ?;
398
402
if conn. send ( network_message) . is_err ( ) {
399
403
conn. disconnect ( ) ;
@@ -586,10 +590,6 @@ impl ConnectionManager {
586
590
587
591
impl Channel for ConnectionManager {
588
592
fn send ( & mut self , command : Command ) -> Result < ( ) , ChannelError > {
589
- self . metrics
590
- . bitcoin_messages_sent
591
- . with_label_values ( & [ command. message . cmd ( ) ] )
592
- . inc ( ) ;
593
593
let Command { address, message } = command;
594
594
if let Some ( addr) = address {
595
595
self . send_to ( & addr, message) . ok ( ) ;
You can’t perform that action at this time.
0 commit comments