Browse Source

fix kcp test

Darien Raymond 7 năm trước cách đây
mục cha
commit
9fdb783729
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      transport/internet/kcp/kcp_test.go

+ 1 - 2
transport/internet/kcp/kcp_test.go

@@ -17,7 +17,7 @@ import (
 func TestDialAndListen(t *testing.T) {
 	assert := With(t)
 
-	listerner, err := NewListener(internet.ContextWithTransportSettings(context.Background(), &Config{}), net.LocalHostIP, net.Port(0), func(ctx context.Context, conn internet.Connection) bool {
+	listerner, err := NewListener(internet.ContextWithTransportSettings(context.Background(), &Config{}), net.LocalHostIP, net.Port(0), func(conn internet.Connection) {
 		go func(c internet.Connection) {
 			payload := make([]byte, 4096)
 			for {
@@ -32,7 +32,6 @@ func TestDialAndListen(t *testing.T) {
 			}
 			c.Close()
 		}(conn)
-		return true
 	})
 	assert(err, IsNil)
 	port := net.Port(listerner.Addr().(*net.UDPAddr).Port)