decred / dcrpool

decred mining pool
ISC License
31 stars 28 forks source link

pool: Prevent potential read goroutine leak. #375

Closed davecgh closed 1 year ago

davecgh commented 1 year ago

This requires #373.

This ensures the send to the read channel for a client respects the context since it could otherwise end up hanging forever when sending to the channel that no longer has a goroutine reading from it thereby leaking the goroutine.

It also includes the read goroutine in the overall waitgroup for the client to help ensure it shuts down as intended.