mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-08-22 17:46:48 +08:00
Fix: CounterConnection with ReadV/WriteV (#720)
Co-authored-by: JimhHan <50871214+JimhHan@users.noreply.github.com>
This commit is contained in:
@@ -7,6 +7,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/xtls/xray-core/transport/internet/stat"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"golang.org/x/sync/errgroup"
|
||||
|
||||
@@ -21,8 +23,8 @@ func TestDialAndListen(t *testing.T) {
|
||||
listerner, err := NewListener(context.Background(), net.LocalHostIP, net.Port(0), &internet.MemoryStreamConfig{
|
||||
ProtocolName: "mkcp",
|
||||
ProtocolSettings: &Config{},
|
||||
}, func(conn internet.Connection) {
|
||||
go func(c internet.Connection) {
|
||||
}, func(conn stat.Connection) {
|
||||
go func(c stat.Connection) {
|
||||
payload := make([]byte, 4096)
|
||||
for {
|
||||
nBytes, err := c.Read(payload)
|
||||
|
Reference in New Issue
Block a user