mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 07:06:58 +08:00
server: change error
This commit is contained in:
@@ -280,10 +280,10 @@ func (e ErrServerUDPPortsAlreadyInUse) Error() string {
|
||||
e.Port, e.Port+1)
|
||||
}
|
||||
|
||||
// ErrServerSessionNoAssociatedConns is an error that can be returned by a server.
|
||||
type ErrServerSessionNoAssociatedConns struct{}
|
||||
// ErrServerSessionNotInUse is an error that can be returned by a server.
|
||||
type ErrServerSessionNotInUse struct{}
|
||||
|
||||
// Error implements the error interface.
|
||||
func (e ErrServerSessionNoAssociatedConns) Error() string {
|
||||
return "there are no associated connections anymore"
|
||||
func (e ErrServerSessionNotInUse) Error() string {
|
||||
return "not in use"
|
||||
}
|
||||
|
@@ -305,7 +305,7 @@ func (ss *ServerSession) run() {
|
||||
*ss.setuppedTransport == TransportTCP {
|
||||
// close if there are no associated connections
|
||||
if len(ss.conns) == 0 {
|
||||
return liberrors.ErrServerSessionNoAssociatedConns{}
|
||||
return liberrors.ErrServerSessionNotInUse{}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user