forked from quic-go/quic-go
fix flaky proxy test
This commit is contained in:
@@ -2,6 +2,7 @@ package quicproxy
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
"runtime/pprof"
|
"runtime/pprof"
|
||||||
"strconv"
|
"strconv"
|
||||||
@@ -9,10 +10,9 @@ import (
|
|||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||||
"github.com/lucas-clemente/quic-go/internal/wire"
|
"github.com/lucas-clemente/quic-go/internal/wire"
|
||||||
|
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
@@ -160,8 +160,8 @@ var _ = Describe("QUIC Proxy", func() {
|
|||||||
data := buf[0:n]
|
data := buf[0:n]
|
||||||
serverReceivedPackets <- packetData(data)
|
serverReceivedPackets <- packetData(data)
|
||||||
// echo the packet
|
// echo the packet
|
||||||
serverConn.WriteToUDP(data, addr)
|
|
||||||
atomic.AddInt32(&serverNumPacketsSent, 1)
|
atomic.AddInt32(&serverNumPacketsSent, 1)
|
||||||
|
serverConn.WriteToUDP(data, addr)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user