1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Test: Fix bug for srs-bench.

This commit is contained in:
winlin 2021-03-12 13:10:10 +08:00
parent c07b7db3c5
commit ccbc11c2d6

View file

@ -606,12 +606,10 @@ func NewTestWebRTCAPI(options ...TestWebRTCAPIOptionFunc) (*TestWebRTCAPI, error
func (v *TestWebRTCAPI) Close() error {
if v.proxy != nil {
v.proxy.Close()
v.proxy = nil
}
if v.router != nil {
v.router.Stop()
v.router = nil
}
return nil
@ -702,13 +700,11 @@ func NewTestPlayer(api *TestWebRTCAPI, options ...TestPlayerOptionFunc) (*TestPl
func (v *TestPlayer) Close() error {
if v.pc != nil {
v.pc.Close()
v.pc = nil
}
for _, receiver := range v.receivers {
receiver.Stop()
}
v.receivers = nil
return nil
}