session: fix bitflags on mod.rs

This commit is contained in:
draoi
2024-04-09 10:36:53 +02:00
parent b343d6132c
commit 7e95c56d61

View File

@@ -70,7 +70,8 @@ pub async fn remove_sub_on_stop(p2p: P2pPtr, channel: ChannelPtr, type_id: Sessi
"Received stop event. Removing channel {}", addr,
);
if type_id == SESSION_MANUAL || type_id == SESSION_OUTBOUND {
// Downgrade to greylist this is a outbound or manual session.
if type_id & (SESSION_MANUAL | SESSION_OUTBOUND) != 0 {
debug!(
target: "net::session::remove_sub_on_stop()",
"Downgrading {}", addr,
@@ -164,8 +165,8 @@ pub trait Session: Sync {
// Perform handshake
protocol_version.run(executor.clone()).await?;
// Upgrade to goldlist if outbound or manual session.
if self.type_id() == SESSION_MANUAL || self.type_id() == SESSION_OUTBOUND {
// Upgrade to goldlist if this is a outbound or manual session.
if self.type_id() & (SESSION_MANUAL | SESSION_OUTBOUND) != 0 {
debug!(
target: "net::session::perform_handshake_protocols()",
"Upgrading {}", channel.address(),