Skip to content

Pool.Close blocks indefinitely when a panic happens during iteration of statement rows #73

Answered by zombiezen
comunidadio asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for the minimal reproducer. It seems that what happens here is that there is an additional panic during dbpool.Put because the connection has a pending statement. If you add a defer stmt.Reset() after conn.Prep, the program completes as expected.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@comunidadio
Comment options

@zombiezen
Comment options

Answer selected by comunidadio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #72 on January 25, 2024 16:24.