修复判断rtsp连接是否存在bug

This commit is contained in:
hkmadao
2024-11-22 21:08:10 +08:00
parent da9323694a
commit 560ac2da13

View File

@@ -38,7 +38,10 @@ func (rc *RtspClientManager) ExistsPublisher(code string) bool {
exists := false
rc.rcs.Range(func(key, value interface{}) bool {
codeKey := key.(string)
exists = codeKey == code
if codeKey == code {
exists = true
return false
}
return true
})
return exists