ServerUDPListener: set writeTimeout once

This commit is contained in:
aler9
2021-01-07 21:07:51 +01:00
parent 0680ffa9a3
commit 87bd5bde32
3 changed files with 9 additions and 5 deletions

View File

@@ -37,7 +37,10 @@ func newServer(conf ServerConf, address string) (*Server, error) {
if conf.UDPRTPListener != nil {
conf.UDPRTPListener.streamType = StreamTypeRTP
conf.UDPRTPListener.writeTimeout = conf.WriteTimeout
conf.UDPRTCPListener.streamType = StreamTypeRTCP
conf.UDPRTCPListener.writeTimeout = conf.WriteTimeout
}
listener, err := conf.Listen("tcp", address)