mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 12:17:59 +08:00
avoid reusing context object
fix https://github.com/chrislusf/seaweedfs/issues/1182
This commit is contained in:
@@ -34,9 +34,8 @@ func (c *commandCollectionDelete) Do(args []string, commandEnv *CommandEnv, writ
|
||||
|
||||
collectionName := args[0]
|
||||
|
||||
ctx := context.Background()
|
||||
err = commandEnv.MasterClient.WithClient(ctx, func(client master_pb.SeaweedClient) error {
|
||||
_, err = client.CollectionDelete(ctx, &master_pb.CollectionDeleteRequest{
|
||||
err = commandEnv.MasterClient.WithClient(func(client master_pb.SeaweedClient) error {
|
||||
_, err = client.CollectionDelete(context.Background(), &master_pb.CollectionDeleteRequest{
|
||||
Name: collectionName,
|
||||
})
|
||||
return err
|
||||
|
Reference in New Issue
Block a user