Skip to content

Conversation

@changkun
Copy link
Contributor

@changkun changkun commented Sep 7, 2019

This CL makes ConnPool exit immediately when the client is closed.

Fixes #1029

This CL makes ConnPool exit immediately when the client is closed.

Fixes #1029
@changkun
Copy link
Contributor Author

changkun commented Sep 7, 2019

@vmihailenco No idea how the test failed in travis-ci. The CL passes all tests locally.

Note that this CL does not eliminates p.closed() check to avoid ticker
case being executed accidentally.

Fixes #1029
@changkun changkun requested a review from vmihailenco September 7, 2019 18:22
case <-ticker.C:
// It is possible that ticker and closedCh arrive together,
// and select pseudo-randomly pick ticker case, we double
// check here to prevent being executed after closed.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good call - thanks for adding the comment!

@changkun changkun requested a review from vmihailenco September 8, 2019 12:42
@vmihailenco
Copy link
Collaborator

Thanks!

@vmihailenco vmihailenco merged commit cb2d1c8 into redis:master Sep 9, 2019
@changkun changkun deleted the issue1029 branch September 9, 2019 09:09
vmihailenco pushed a commit that referenced this pull request Mar 11, 2020
* internal/pool: exit conn pool reaper fast
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simple example leaking goroutines

2 participants