mirror of
https://github.com/Monibuca/engine.git
synced 2025-10-06 00:56:58 +08:00
增加判断
This commit is contained in:
@@ -30,8 +30,12 @@ type Subscriber struct {
|
||||
}
|
||||
|
||||
func (s *Subscriber) close() {
|
||||
s.UnSubscribe(s)
|
||||
s.cancel()
|
||||
if s.Stream != nil {
|
||||
s.UnSubscribe(s)
|
||||
}
|
||||
if s.cancel != nil {
|
||||
s.cancel()
|
||||
}
|
||||
}
|
||||
|
||||
// Close 关闭订阅者
|
||||
|
Reference in New Issue
Block a user