mirror of
https://github.com/CPunch/gopenfusion.git
synced 2024-11-21 23:10:06 +00:00
use passed context.Context
This commit is contained in:
parent
0ebd162af0
commit
2a6fb25f03
@ -28,7 +28,7 @@ func makeDummyPeer(ctx context.Context, is *is.I, recv chan<- *cnet.PacketEvent)
|
|||||||
conn, err := net.Dial("tcp", fmt.Sprintf("127.0.0.1:%d", loginPort))
|
conn, err := net.Dial("tcp", fmt.Sprintf("127.0.0.1:%d", loginPort))
|
||||||
is.NoErr(err)
|
is.NoErr(err)
|
||||||
|
|
||||||
peer := cnet.NewPeer(context.Background(), conn)
|
peer := cnet.NewPeer(ctx, conn)
|
||||||
go func() {
|
go func() {
|
||||||
peer.Handler(recv)
|
peer.Handler(recv)
|
||||||
}()
|
}()
|
||||||
|
Loading…
Reference in New Issue
Block a user