Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential leak in notify.go #1126

Open
hhheiaenia opened this issue May 28, 2023 · 1 comment
Open

Potential leak in notify.go #1126

hhheiaenia opened this issue May 28, 2023 · 1 comment

Comments

@hhheiaenia
Copy link

In file https://github.com/lib/pq/blob/master/notify.go#L585,
I notice that when the if condition is met, the Wait() blocks the goroutine and waits for a single.
So I was wondering that is there something that prevents the goroutine from being woken up?
Could the unblock signal always unblock the goroutine?

@johto
Copy link
Contributor

johto commented Oct 12, 2023

So I was wondering that is there something that prevents the goroutine from being woken up?

The listenerConnMain goroutine should eventually wake it up.

Could the unblock signal always unblock the goroutine?

I'm not sure I understand what you're asking here. Could you explain in a bit more detail?

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

No branches or pull requests

2 participants