detect when the connection with the server is closed when publishing with udp (#6)

This commit is contained in:
aler9
2020-10-16 23:13:24 +02:00
parent b647e5ee31
commit c792387d79
5 changed files with 64 additions and 50 deletions

View File

@@ -59,6 +59,7 @@ func main() {
// write frames to the server
err = conn.WriteFrameTCP(track.Id, gortsplib.StreamTypeRtp, buf[:n])
if err != nil {
fmt.Println("connection is closed (%s)", err)
break
}
}