mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-08-24 10:36:49 +08:00
Fix: CounterConnection with ReadV/WriteV (#720)
Co-authored-by: JimhHan <50871214+JimhHan@users.noreply.github.com>
This commit is contained in:
@@ -6,6 +6,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/xtls/xray-core/transport/internet/stat"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
|
||||
"github.com/xtls/xray-core/common"
|
||||
@@ -37,7 +39,7 @@ func TestQuicConnection(t *testing.T) {
|
||||
),
|
||||
},
|
||||
},
|
||||
}, func(conn internet.Connection) {
|
||||
}, func(conn stat.Connection) {
|
||||
go func() {
|
||||
defer conn.Close()
|
||||
|
||||
@@ -100,7 +102,7 @@ func TestQuicConnectionWithoutTLS(t *testing.T) {
|
||||
listener, err := quic.Listen(context.Background(), net.LocalHostIP, port, &internet.MemoryStreamConfig{
|
||||
ProtocolName: "quic",
|
||||
ProtocolSettings: &quic.Config{},
|
||||
}, func(conn internet.Connection) {
|
||||
}, func(conn stat.Connection) {
|
||||
go func() {
|
||||
defer conn.Close()
|
||||
|
||||
@@ -164,7 +166,7 @@ func TestQuicConnectionAuthHeader(t *testing.T) {
|
||||
Type: protocol.SecurityType_AES128_GCM,
|
||||
},
|
||||
},
|
||||
}, func(conn internet.Connection) {
|
||||
}, func(conn stat.Connection) {
|
||||
go func() {
|
||||
defer conn.Close()
|
||||
|
||||
|
Reference in New Issue
Block a user