You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I thought about it and I'm not sure we need to use <-done to maintain scope. handler should be the one responsible for getting a redis connection from the pool.
Pools (mostly) eliminate the connection setup overhead by re-using idle connections
If you have a single connection for all of incomingTxWatcher does that mean each instance of handler will try to use the same connection? It seems like danger lies ahead if we use a single connection.
Use
<-done
at the end of incomingTxWatcher to block variables from losing scope. Also add thedefer
call there too.Issue being that the L15 of
incomingTxWatcher
could shadow a variable used somewhere else.The text was updated successfully, but these errors were encountered: