Skip to content

Conversation

@joway
Copy link
Collaborator

@joway joway commented Sep 3, 2024

Reproduction condition

  1. channel using consume throttle: eg ch := channel.New(channel.WithRateThrottle(0, 1))
  2. have a goroutine block on ch.Output()
  3. and then call ch.Close() in another goroutine

In such case, ch.Output() will not be triggered and this goroutine will be leak and block forever.

Reason

The root cause is when consume throttle recover, it forget to close channel and let output channel alive.

@joway joway enabled auto-merge (squash) September 3, 2024 06:55
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.

4 participants