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