mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 07:06:58 +08:00
fix various race conditions when writing packets to closed clients or server sessions (#684)
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestAsyncProcessorStopAfterError(t *testing.T) {
|
||||
func TestAsyncProcessorCloseAfterError(t *testing.T) {
|
||||
p := &asyncProcessor{bufferSize: 8}
|
||||
p.initialize()
|
||||
|
||||
@@ -17,8 +17,8 @@ func TestAsyncProcessorStopAfterError(t *testing.T) {
|
||||
|
||||
p.start()
|
||||
|
||||
<-p.stopped
|
||||
<-p.chStopped
|
||||
require.EqualError(t, p.stopError, "ok")
|
||||
|
||||
p.stop()
|
||||
p.close()
|
||||
}
|
||||
|
Reference in New Issue
Block a user