From 484d89ad38ea47a460fd86db2351823622897932 Mon Sep 17 00:00:00 2001 From: sukun Date: Tue, 13 Aug 2024 00:12:44 +0530 Subject: [PATCH] Fix SCTPTransport OnClose test --- sctptransport_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sctptransport_test.go b/sctptransport_test.go index d8eb6155d7f..b18fc2281cb 100644 --- a/sctptransport_test.go +++ b/sctptransport_test.go @@ -59,6 +59,8 @@ func TestSCTPTransportOnClose(t *testing.T) { offerPC, answerPC, err := newPair() require.NoError(t, err) + defer closePairNow(t, offerPC, answerPC) + answerPC.OnDataChannel(func(dc *DataChannel) { dc.OnMessage(func(_ DataChannelMessage) { if err1 := dc.Send([]byte("hello")); err1 != nil {