Commit Graph

6 Commits

Author SHA1 Message Date
Brian Goff eaad3ee3cf Make sure timers are stopped after use.
`time.After` keeps a timer running until the specified duration is
completed. It also allocates a new timer on each call. This can wind up
leaving lots of uneccessary timers running in the background that are
not needed and consume resources.

Instead of `time.After`, use `time.NewTimer` so the timer can actually
be stopped.
In some of these cases it's not a big deal since the duraiton is really
short, but in others it is much worse.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2019-01-16 14:32:53 -08:00
Daniel Nephin 4f0d95fa6e Add canonical import comment
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-02-05 16:51:57 -05:00
Derek McGowan 1009e6a40b
Update logrus to v1.0.1
Fixes case sensitivity issue

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-07-31 13:16:46 -07:00
Yanqiang Miao 87d0a3ad89 The returned err should be printed
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2017-03-29 09:00:50 +08:00
Yanqiang Miao fb2bc35210 The variable heartbeat might be 0
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

perfect the test case for 'discoveryOpts'

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2017-03-27 10:07:58 +08:00
Vincent Demeester db63f9370e
Extract daemon configuration and discovery to their own package
This also moves some cli specific in `cmd/dockerd` as it does not
really belong to the `daemon/config` package.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-02-08 09:53:38 +01:00