adjust / rmq

Message queue system written in Go and backed by Redis
MIT License
1.56k stars 205 forks source link

heartbeat is not stopped #142

Closed KopiasCsaba closed 8 months ago

KopiasCsaba commented 1 year ago

It seems, that upon closing up the rmq connection, a goroutine is leaked.

The reason seems to be, that there is nothing to stop the heartbeat if the queues and the client itself is closed.

There is a stopHeartbeat() method but it is private.

wellle commented 1 year ago

True. We should probably add a mechanism so once the closed connection is done with all pending internal work it would stop its own heartbeat.

abarbalat commented 1 year ago

In addition to leaked goroutine, its seems that we need to leak error channel, other wise it can panic, killing the process.