fix log printing with ipv6 urls (part of #6)

This commit is contained in:
aler9 2020-05-03 19:24:54 +02:00
parent da7c1bd1b3
commit 02beefcec9

View file

@ -160,8 +160,9 @@ func (c *serverClient) close() error {
}
func (c *serverClient) log(format string, args ...interface{}) {
format = "[RTSP client " + c.conn.NetConn().RemoteAddr().String() + "] " + format
log.Printf(format, args...)
// keep remote address outside format, since it can contain %
log.Println("[RTSP client " + c.conn.NetConn().RemoteAddr().String() + "] " +
fmt.Sprintf(format, args...))
}
func (c *serverClient) run() {