Skip to content

Commit

Permalink
close the response writer instead of the proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
jyyi1 committed Jul 25, 2023
1 parent 591e663 commit 0cc7eda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions network/lwip2transport/udp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ func TestUDPResponseWriterCloseNoDeadlock(t *testing.T) {

// Close this single session (i.e. the request sender), it will close proxy.respWriter
// udpHandler must make sure only one `Close()` is called, and there should be no deadlocks
err = proxy.Close()
err = proxy.respWriter.Close()
require.NoError(t, err)
require.Exactly(t, 2, proxy.closeCnt) // called by proxy.Close and proxy.respWriter.udpHandler.senders.Close()
require.Exactly(t, 1, proxy.closeCnt)
}

/********** Test Utilities **********/
Expand Down

0 comments on commit 0cc7eda

Please sign in to comment.