Skip to content

context.WithTimeout: do call the cancel func#36920

Merged
thaJeztah merged 1 commit intomoby:masterfrom
kolyshkin:cancel-func
Apr 23, 2018
Merged

context.WithTimeout: do call the cancel func#36920
thaJeztah merged 1 commit intomoby:masterfrom
kolyshkin:cancel-func

Conversation

@kolyshkin
Copy link
Copy Markdown
Contributor

govet complains (when using standard "context" package in #36904):

the cancel function returned by context.WithTimeout should be called,
not discarded, to avoid a context leak (vet)

fix it.

govet complains (when using standard "context" package):

> the cancel function returned by context.WithTimeout should be called,
> not discarded, to avoid a context leak (vet)

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah
Copy link
Copy Markdown
Member

Failing on flaky test #36501

20:51:14 FAIL: docker_api_swarm_service_test.go:33: DockerSwarmSuite.TestAPIServiceUpdatePort
20:51:14 
20:51:14 [d844a9c891505] waiting for daemon to start
20:51:14 [d844a9c891505] daemon started
20:51:14 
20:51:14 docker_api_swarm_service_test.go:39:
20:51:14     waitAndAssert(c, defaultReconciliationTimeout, d.CheckActiveContainerCount, checker.Equals, 1)
20:51:14 docker_utils_test.go:435:
20:51:14     c.Assert(v, checker, args...)
20:51:14 ... obtained int = 0
20:51:14 ... expected int = 1
20:51:14 
20:51:14 [d844a9c891505] exiting daemon
20:51:26 

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 23, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@ba02880). Click here to learn what that means.
The diff coverage is 0%.

@@            Coverage Diff            @@
##             master   #36920   +/-   ##
=========================================
  Coverage          ?   35.42%           
=========================================
  Files             ?      614           
  Lines             ?    46050           
  Branches          ?        0           
=========================================
  Hits              ?    16315           
  Misses            ?    27582           
  Partials          ?     2153

@tonistiigi
Copy link
Copy Markdown
Member

LGTM

@thaJeztah thaJeztah merged commit 20b524b into moby:master Apr 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants