mirror of
https://github.com/aler9/gortsplib
synced 2025-10-16 04:00:46 +08:00
cleanup
This commit is contained in:
@@ -90,9 +90,7 @@ type ConnClient struct {
|
||||
|
||||
// Close closes all the ConnClient resources.
|
||||
func (c *ConnClient) Close() error {
|
||||
s := c.state
|
||||
|
||||
if s == connClientStatePlay || s == connClientStateRecord {
|
||||
if c.state == connClientStatePlay || c.state == connClientStateRecord {
|
||||
close(c.backgroundTerminate)
|
||||
<-c.backgroundDone
|
||||
|
||||
|
Reference in New Issue
Block a user