mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 15:16:51 +08:00
server: cleanup error
This commit is contained in:
@@ -71,7 +71,7 @@ type ErrServerUnhandledRequest struct {
|
|||||||
|
|
||||||
// Error implements the error interface.
|
// Error implements the error interface.
|
||||||
func (e ErrServerUnhandledRequest) Error() string {
|
func (e ErrServerUnhandledRequest) Error() string {
|
||||||
return fmt.Sprintf("unhandled request (%v %v)", e.Req.Method, e.Req.URL)
|
return fmt.Sprintf("unhandled request: %v %v", e.Req.Method, e.Req.URL)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ErrServerInvalidState is an error that can be returned by a server.
|
// ErrServerInvalidState is an error that can be returned by a server.
|
||||||
|
@@ -659,7 +659,7 @@ func TestServerErrorInvalidMethod(t *testing.T) {
|
|||||||
s := &Server{
|
s := &Server{
|
||||||
Handler: &testServerHandler{
|
Handler: &testServerHandler{
|
||||||
onConnClose: func(ctx *ServerHandlerOnConnCloseCtx) {
|
onConnClose: func(ctx *ServerHandlerOnConnCloseCtx) {
|
||||||
require.EqualError(t, ctx.Error, "unhandled request (INVALID rtsp://localhost:8554/)")
|
require.EqualError(t, ctx.Error, "unhandled request: INVALID rtsp://localhost:8554/")
|
||||||
close(connClosed)
|
close(connClosed)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user