mirror of
https://github.com/Monibuca/engine.git
synced 2025-10-22 08:09:22 +08:00
🐛 FIX: 适配go1.19
This commit is contained in:
6
io.go
6
io.go
@@ -131,11 +131,11 @@ func (io *IO[C]) receive(streamPath string, specific IIO, conf *C) error {
|
||||
if v, ok := c.(*config.Publish); ok {
|
||||
io.Type = strings.TrimSuffix(io.Type, "Publisher")
|
||||
oldPublisher := s.Publisher
|
||||
if s.Publisher != nil && !s.Publisher.IsClosed() {
|
||||
if oldPublisher != nil && !oldPublisher.IsClosed() {
|
||||
// 根据配置是否剔出原来的发布者
|
||||
if v.KickExist {
|
||||
s.Warn("kick", zap.String("type", s.Publisher.GetIO().Type))
|
||||
s.Publisher.OnEvent(SEKick{})
|
||||
s.Warn("kick", zap.String("type", oldPublisher.GetIO().Type))
|
||||
oldPublisher.OnEvent(SEKick{})
|
||||
} else {
|
||||
return BadNameErr
|
||||
}
|
||||
|
Reference in New Issue
Block a user