瀏覽代碼

rpc/p2p_method: Don't panic on unknown session_id

x 2 月之前
父節點
當前提交
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_SEED => "seed",
                 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