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:
parent
c07b7db3c5
commit
ccbc11c2d6
1 changed files with 0 additions and 4 deletions
4
trunk/3rdparty/srs-bench/srs/util.go
vendored
4
trunk/3rdparty/srs-bench/srs/util.go
vendored
|
@ -606,12 +606,10 @@ func NewTestWebRTCAPI(options ...TestWebRTCAPIOptionFunc) (*TestWebRTCAPI, error
|
||||||
func (v *TestWebRTCAPI) Close() error {
|
func (v *TestWebRTCAPI) Close() error {
|
||||||
if v.proxy != nil {
|
if v.proxy != nil {
|
||||||
v.proxy.Close()
|
v.proxy.Close()
|
||||||
v.proxy = nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if v.router != nil {
|
if v.router != nil {
|
||||||
v.router.Stop()
|
v.router.Stop()
|
||||||
v.router = nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
@ -702,13 +700,11 @@ func NewTestPlayer(api *TestWebRTCAPI, options ...TestPlayerOptionFunc) (*TestPl
|
||||||
func (v *TestPlayer) Close() error {
|
func (v *TestPlayer) Close() error {
|
||||||
if v.pc != nil {
|
if v.pc != nil {
|
||||||
v.pc.Close()
|
v.pc.Close()
|
||||||
v.pc = nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, receiver := range v.receivers {
|
for _, receiver := range v.receivers {
|
||||||
receiver.Stop()
|
receiver.Stop()
|
||||||
}
|
}
|
||||||
v.receivers = nil
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue