revid: restructure rtmpSender's Close method

This commit is contained in:
Saxon 2019-04-10 12:20:39 +09:30
parent 9a52f19e3d
commit eb866ada5e
1 changed files with 3 additions and 3 deletions

View File

@ -316,11 +316,11 @@ func (s *rtmpSender) restart() error {
} }
func (s *rtmpSender) Close() error { func (s *rtmpSender) Close() error {
if s.conn != nil { if s.conn == nil {
return s.conn.Close()
}
return nil return nil
} }
return s.conn.Close()
}
// TODO: Write restart func for rtpSender // TODO: Write restart func for rtpSender
// rtpSender implements loadSender for a native udp destination with rtp packetization. // rtpSender implements loadSender for a native udp destination with rtp packetization.