re: Go sql.DB Periodic Error: invalid connection VIEW POST

VIEW PARENT COMMENT VIEW FULL DISCUSSION
 

I don't think it's a good workaround. What happens if you lost connection but your goroutine is still waiting for next run?

So would the suggestion here be to retry faster if the connection is lost?

Also, instead of for+sleep you can use time.NewTicker

Thanks, I'll look into that!

code of conduct - report abuse