check error from read timeout
This commit is contained in:
parent
32d2ef9f73
commit
eacd0bcbd4
@ -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
|
||||
_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()
|
||||
|
||||
// Broadcaster disconnected
|
||||
|
Loading…
x
Reference in New Issue
Block a user