Skip to content

Commit

Permalink
Clean up packet queue in udpMuxedConn Close
Browse files Browse the repository at this point in the history
  • Loading branch information
paulwe committed May 1, 2024
1 parent ed41bbf commit b7d870c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions udp_muxed_conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ func (c *udpMuxedConn) Close() error {

pkt = next
}
c.bufHead = nil
c.bufTail = nil

Check warning on line 148 in udp_muxed_conn.go

View check run for this annotation

Codecov / codecov/patch

udp_muxed_conn.go#L147-L148

Added lines #L147 - L148 were not covered by tests

c.state = udpMuxedConnClosed
close(c.closedChan)
Expand Down

0 comments on commit b7d870c

Please sign in to comment.