1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #41522 from thaJeztah/19.03_backport_gcp_leak

[19.03 backport] Fix gcplogs memory/connection leak
This commit is contained in:
Brian Goff 2020-10-06 14:27:10 -07:00 committed by GitHub
commit 233a6379e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,6 +53,7 @@ func init() {
}
type gcplogs struct {
client *logging.Client
logger *logging.Logger
instance *instanceInfo
container *containerInfo
@ -169,6 +170,7 @@ func New(info logger.Info) (logger.Logger, error) {
}
l := &gcplogs{
client: c,
logger: lg,
container: &containerInfo{
Name: info.ContainerName,
@ -236,7 +238,7 @@ func (l *gcplogs) Log(m *logger.Message) error {
func (l *gcplogs) Close() error {
l.logger.Flush()
return nil
return l.client.Close()
}
func (l *gcplogs) Name() string {