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
mysql.Connect is leaving open connections in cases when the context is canceled very quickly. Specifically, the error branch for watchCancel() in connector.go should call mc.cleanup() but doesn't:
// Call startWatcher for context support (From Go 1.8)mc.startWatcher()
iferr:=mc.watchCancel(ctx); err!=nil {
returnnil, err
}
defermc.finish()
We've reproduced this leak internally under heavy load, and that adding a call to mc.cleanup() fixes it.