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 have accidentally closed the db connection before using it ( I had a stray defer db.Close() )
It took me a while to figure out what was causing the panic - there was no good error message to tell me what was the problem.
The panic message was looking like this:
@zombiezen the 3255b67 commit does not really fix the problem, or at least I don't see how can it. It will only give an error on repeated close, but not when a closed connection is used to execute statements. The problem I had was that I was trying to perform a a select on the closed connection.
I have accidentally closed the db connection before using it ( I had a stray
defer db.Close()
)It took me a while to figure out what was causing the panic - there was no good error message to tell me what was the problem.
The panic message was looking like this:
Is it possible to provide a more user-friendly panic message when a closed DB is being used?
For example put somewhere a check :
The text was updated successfully, but these errors were encountered: