mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-30 05:56:54 -05:00
close conn after use
This commit is contained in:
parent
956868ef78
commit
891bdd14fe
@ -131,6 +131,7 @@ func TestCommanderRemoveHandler(t *testing.T) {
|
||||
|
||||
cmdConn, err := grpc.Dial(fmt.Sprintf("127.0.0.1:%d", cmdPort), grpc.WithInsecure(), grpc.WithBlock())
|
||||
assert(err, IsNil)
|
||||
defer cmdConn.Close()
|
||||
|
||||
hsClient := command.NewHandlerServiceClient(cmdConn)
|
||||
resp, err := hsClient.RemoveInbound(context.Background(), &command.RemoveInboundRequest{
|
||||
@ -311,6 +312,7 @@ func TestCommanderAddRemoveUser(t *testing.T) {
|
||||
|
||||
cmdConn, err := grpc.Dial(fmt.Sprintf("127.0.0.1:%d", cmdPort), grpc.WithInsecure(), grpc.WithBlock())
|
||||
assert(err, IsNil)
|
||||
defer cmdConn.Close()
|
||||
|
||||
hsClient := command.NewHandlerServiceClient(cmdConn)
|
||||
resp, err := hsClient.AlterInbound(context.Background(), &command.AlterInboundRequest{
|
||||
@ -524,6 +526,7 @@ func TestCommanderStats(t *testing.T) {
|
||||
|
||||
cmdConn, err := grpc.Dial(fmt.Sprintf("127.0.0.1:%d", cmdPort), grpc.WithInsecure(), grpc.WithBlock())
|
||||
assert(err, IsNil)
|
||||
defer cmdConn.Close()
|
||||
|
||||
const name = "user>>>test>>>traffic>>>uplink"
|
||||
sClient := statscmd.NewStatsServiceClient(cmdConn)
|
||||
|
Loading…
Reference in New Issue
Block a user