mirror of
https://github.com/aler9/gortsplib
synced 2025-10-08 08:30:06 +08:00
client: apply TCP timeout correctly (https://github.com/aler9/rtsp-simple-server/issues/335)
This commit is contained in:
@@ -142,7 +142,7 @@ func (e ErrClientNoUDPPacketsRecently) Error() string {
|
||||
return "no UDP packets received (maybe there's a firewall/NAT in between)"
|
||||
}
|
||||
|
||||
// ErrClientUDPTimeout is returned when UDP packets have been received previously
|
||||
// ErrClientUDPTimeout is returned when timeout has exceeded but UDP packets have been received previously
|
||||
// but now nothing is being received.
|
||||
type ErrClientUDPTimeout struct{}
|
||||
|
||||
@@ -151,6 +151,14 @@ func (e ErrClientUDPTimeout) Error() string {
|
||||
return "UDP timeout"
|
||||
}
|
||||
|
||||
// ErrClientTCPTimeout is returned when timeout has exceeded.
|
||||
type ErrClientTCPTimeout struct{}
|
||||
|
||||
// Error implements the error interface.
|
||||
func (e ErrClientTCPTimeout) Error() string {
|
||||
return "TCP timeout"
|
||||
}
|
||||
|
||||
// ErrClientRTPInfoInvalid is returned in case of an invalid RTP-Info.
|
||||
type ErrClientRTPInfoInvalid struct {
|
||||
Err error
|
||||
|
Reference in New Issue
Block a user