mirror of
https://github.com/Monibuca/plugin-rtmp.git
synced 2025-10-05 23:47:04 +08:00
增加断开连接时的日志输出
This commit is contained in:
@@ -3,6 +3,7 @@ package rtmp
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"sync/atomic"
|
||||
|
||||
@@ -167,7 +168,11 @@ func (config *RTMPConfig) ServeTCP(conn *net.TCPConn) {
|
||||
RTMPPlugin.Warn("ReceiveVideo", zap.Uint32("MessageStreamID", msg.MessageStreamID))
|
||||
}
|
||||
}
|
||||
} else if err == io.EOF {
|
||||
RTMPPlugin.Info("rtmp client closed", zap.String("remote", conn.RemoteAddr().String()))
|
||||
return
|
||||
} else {
|
||||
RTMPPlugin.Warn("ReadMessage", zap.Error(err))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user