mirror of
https://github.com/Monibuca/plugin-rtmp.git
synced 2025-10-05 07:27:14 +08:00
fix: 加上对默认端口号的判断
This commit is contained in:
@@ -17,6 +17,9 @@ func NewRTMPClient(addr string) (client *NetConnection, err error) {
|
||||
plugin.Error("connect url parse", zap.Error(err))
|
||||
return nil, err
|
||||
}
|
||||
if strings.Count(u.Host, ":") == 0 {
|
||||
u.Host += ":1935"
|
||||
}
|
||||
conn, err := net.Dial("tcp", u.Host)
|
||||
if err != nil {
|
||||
plugin.Error("dial tcp", zap.String("host", u.Host), zap.Error(err))
|
||||
|
Reference in New Issue
Block a user