forked from quic-go/quic-go
ci: update golangci-lint to v2 (#5007)
This commit is contained in:
@@ -131,7 +131,7 @@ func newBrokenConn(conn net.PacketConn) *brokenConn {
|
||||
go func() {
|
||||
<-c.broken
|
||||
// make calls to ReadFrom return
|
||||
c.PacketConn.SetDeadline(time.Now())
|
||||
c.SetDeadline(time.Now())
|
||||
}()
|
||||
return c
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ func (ln *fakeClosingListener) Accept(ctx context.Context) (quic.EarlyConnection
|
||||
func (ln *fakeClosingListener) Close() error {
|
||||
if ln.closed.CompareAndSwap(false, true) {
|
||||
ln.cancel()
|
||||
if ln.listenerWrapper.count.Add(-1) == 0 {
|
||||
if ln.count.Add(-1) == 0 {
|
||||
ln.listenerWrapper.Close()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -326,10 +326,7 @@ func TestMultiplexingNonQUICPackets(t *testing.T) {
|
||||
minExpected := numPackets * 4 / 5
|
||||
timeout := time.After(time.Second)
|
||||
var counter int
|
||||
for {
|
||||
if counter >= minExpected {
|
||||
break
|
||||
}
|
||||
for counter < minExpected {
|
||||
select {
|
||||
case p := <-rcvdPackets:
|
||||
require.Equal(t, tr1.Conn.LocalAddr(), p.addr, "non-QUIC packet received from wrong address")
|
||||
|
||||
@@ -332,7 +332,7 @@ func Test0RTTWaitForHandshakeCompletion(t *testing.T) {
|
||||
// check that 0-RTT packets only contain STREAM frames for the first stream
|
||||
var num0RTT int
|
||||
for _, p := range counter.getRcvdLongHeaderPackets() {
|
||||
if p.hdr.Header.Type != protocol.PacketType0RTT {
|
||||
if p.hdr.Type != protocol.PacketType0RTT {
|
||||
continue
|
||||
}
|
||||
for _, f := range p.frames {
|
||||
|
||||
Reference in New Issue
Block a user