diff --git a/moq-transport/src/session.rs b/moq-transport/src/session.rs index a5760e6..96e95ae 100644 --- a/moq-transport/src/session.rs +++ b/moq-transport/src/session.rs @@ -26,10 +26,6 @@ impl Session { .find(|version| **version == setup::Version::DRAFT_00) .context("no supported versions")?; - if !setup_client.role.compatible(role) { - anyhow::bail!("incompatible roles: {:?} {:?}", setup_client.role, role); - } - let setup_server = setup::Server { role, version: setup::Version::DRAFT_00, @@ -75,10 +71,6 @@ impl Session { anyhow::bail!("unsupported version: {:?}", setup_server.version); } - if !setup_server.role.compatible(role) { - anyhow::bail!("incompatible roles: {:?} {:?}", role, setup_server.role); - } - let send_control = message::Sender::new(send); let recv_control = message::Receiver::new(recv); diff --git a/moq-transport/src/setup/role.rs b/moq-transport/src/setup/role.rs index 47e3d21..c8d6222 100644 --- a/moq-transport/src/setup/role.rs +++ b/moq-transport/src/setup/role.rs @@ -23,10 +23,6 @@ impl Role { Self::Publisher => false, } } - - pub fn compatible(&self, other: Role) -> bool { - self.is_publisher() == other.is_subscriber() && self.is_subscriber() == other.is_publisher() - } } impl From for VarInt {