Skip to content

Commit

Permalink
1.docker sdk 需要close client 避免fd堆积
Browse files Browse the repository at this point in the history
  • Loading branch information
ning1875 committed Jan 20, 2021
1 parent 81cbd53 commit 5bedead
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion collect/inspect_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func getLabelMapByDockerSdk(nidLabelName string) (map[string]map[string]string,
if err != nil {
return nil, err
}

defer cli.Close()
containers, err := cli.ContainerList(ctx, types.ContainerListOptions{})
if err != nil {
return nil, err
Expand Down

0 comments on commit 5bedead

Please sign in to comment.