make WritePacket*() return errors when write queue is full (#388)

This commit is contained in:
Alessandro Ros
2023-08-26 18:09:45 +02:00
committed by GitHub
parent 9453e55f3d
commit 3bdae4ed46
14 changed files with 127 additions and 37 deletions

View File

@@ -776,6 +776,8 @@ func TestClientRecordAutomaticProtocol(t *testing.T) {
require.NoError(t, err)
defer l.Close()
recv := make(chan struct{})
serverDone := make(chan struct{})
defer func() { <-serverDone }()
go func() {
@@ -866,6 +868,8 @@ func TestClientRecordAutomaticProtocol(t *testing.T) {
require.NoError(t, err)
require.Equal(t, testRTPPacket, pkt)
close(recv)
req, err = conn.ReadRequest()
require.NoError(t, err)
require.Equal(t, base.Teardown, req.Method)
@@ -887,6 +891,8 @@ func TestClientRecordAutomaticProtocol(t *testing.T) {
err = c.WritePacketRTP(medi, &testRTPPacket)
require.NoError(t, err)
<-recv
}
func TestClientRecordDecodeErrors(t *testing.T) {