fix isChannelPairInUse() (#306)

This commit is contained in:
Alessandro Ros
2023-06-09 12:34:10 +02:00
committed by GitHub
parent e583556d86
commit ccf42f49c7
2 changed files with 2 additions and 2 deletions

View File

@@ -1115,7 +1115,7 @@ func (ss *ServerSession) handleRequestInner(sc *ServerConn, req *base.Request) (
func (ss *ServerSession) isChannelPairInUse(channel int) bool {
for _, sm := range ss.setuppedMedias {
if sm.tcpChannel == channel || sm.tcpChannel == (channel+1) {
if (sm.tcpChannel+1) == channel || sm.tcpChannel == channel || sm.tcpChannel == (channel+1) {
return true
}
}