0

check error from read timeout

This commit is contained in:
Gabe Kangas 2021-01-16 17:24:12 -08:00
parent 32d2ef9f73
commit eacd0bcbd4

View File

@ -115,7 +115,9 @@ func HandleConn(c *rtmp.Conn, nc net.Conn) {
} }
// If we don't get a readable packet in 10 seconds give up and disconnect // If we don't get a readable packet in 10 seconds give up and disconnect
_rtmpConnection.SetReadDeadline(time.Now().Add(10 * time.Second)) if err := _rtmpConnection.SetReadDeadline(time.Now().Add(10 * time.Second)); err != nil {
log.Warnln(err)
}
pkt, err := c.ReadPacket() pkt, err := c.ReadPacket()
// Broadcaster disconnected // Broadcaster disconnected