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
Because defer does not run until the end of the function.
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
I don't know.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Learn the code for the database/sql connection pool part.
What did you expect to see?
I wonder why 'defer' is not used to release mutex in the 'putConn' function.
![image](https://user-images.githubusercontent.com/3816205/85564638-04648180-b661-11ea-9d9c-db44ca0ba5d4.png)
What did you see instead?
The text was updated successfully, but these errors were encountered: