Bläddra i källkod

rpc/p2p_method: Don't panic on unknown session_id

x 2 månader sedan
förälder
incheckning
f8aa82b249
1 ändrade filer med 1 tillägg och 1 borttagningar
  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