mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 15:16:51 +08:00
move errors into subpackage
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/aler9/gortsplib/pkg/base"
|
||||
"github.com/aler9/gortsplib/pkg/liberrors"
|
||||
)
|
||||
|
||||
type testServ struct {
|
||||
@@ -203,7 +204,7 @@ func (ts *testServ) handleConn(conn *ServerConn) {
|
||||
OnFrame: onFrame,
|
||||
})
|
||||
if err != io.EOF {
|
||||
if _, ok := err.(ErrServerTeardown); !ok {
|
||||
if _, ok := err.(liberrors.ErrServerTeardown); !ok {
|
||||
fmt.Println("ERR", err)
|
||||
}
|
||||
}
|
||||
@@ -466,7 +467,7 @@ func TestServerConnTeardownResponse(t *testing.T) {
|
||||
defer conn.Close()
|
||||
|
||||
err = <-conn.Read(ServerConnReadHandlers{})
|
||||
_, ok := err.(ErrServerTeardown)
|
||||
_, ok := err.(liberrors.ErrServerTeardown)
|
||||
require.Equal(t, true, ok)
|
||||
}()
|
||||
|
||||
|
Reference in New Issue
Block a user