Просмотр исходного кода

rpc/p2p_method: Don't panic on unknown session_id

x 2 месяцев назад
Родитель
Сommit
f8aa82b249
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/rpc/p2p_method.rs

+ 1 - 1
src/rpc/p2p_method.rs

@@ -36,7 +36,7 @@ pub trait HandlerP2p: Sync + Send {
                 net::session::SESSION_REFINE => "refine",
                 net::session::SESSION_REFINE => "refine",
                 net::session::SESSION_SEED => "seed",
                 net::session::SESSION_SEED => "seed",
                 net::session::SESSION_DIRECT => "direct",
                 net::session::SESSION_DIRECT => "direct",
-                _ => panic!("invalid result from channel.session_type_id()"),
+                other => &format!("unknown({other})"),
             };
             };
 
 
             // For transport mixed connections send the mixed url to aid in debugging
             // For transport mixed connections send the mixed url to aid in debugging