mirror of
https://github.com/hkmadao/rtsp2rtmp.git
synced 2025-09-26 19:31:19 +08:00
修复判断rtsp连接是否存在bug
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user