mirror of
https://github.com/aler9/gortsplib
synced 2025-10-04 06:46:42 +08:00
fix various race conditions
This commit is contained in:
@@ -301,6 +301,8 @@ outer:
|
||||
}
|
||||
}
|
||||
|
||||
cc.ctxCancel()
|
||||
|
||||
cc.doClose(false)
|
||||
}
|
||||
|
||||
|
@@ -336,6 +336,8 @@ outer:
|
||||
}
|
||||
}
|
||||
|
||||
s.ctxCancel()
|
||||
|
||||
if s.udpRTCPListener != nil {
|
||||
s.udpRTCPListener.close()
|
||||
}
|
||||
|
@@ -235,6 +235,8 @@ func (sc *ServerConn) run() {
|
||||
}
|
||||
}()
|
||||
|
||||
sc.ctxCancel()
|
||||
|
||||
if sc.tcpFrameEnabled {
|
||||
sc.tcpFrameWriteBuffer.Close()
|
||||
<-sc.tcpFrameBackgroundWriteDone
|
||||
|
@@ -318,6 +318,8 @@ func (ss *ServerSession) run() {
|
||||
}
|
||||
}()
|
||||
|
||||
ss.ctxCancel()
|
||||
|
||||
switch ss.state {
|
||||
case ServerSessionStatePlay:
|
||||
if *ss.setupProtocol == StreamProtocolUDP {
|
||||
|
Reference in New Issue
Block a user