close statment only if its not closed
This commit is contained in:
parent
985ace4d7f
commit
d48add714d
@ -102,7 +102,7 @@ def disconnect!
|
||||
|
||||
# Clears the prepared statements cache.
|
||||
def clear_cache!
|
||||
@statements.values.each { |hash| hash[:stmt].close }
|
||||
@statements.values.each { |hash| !hash[:stmt].closed? && hash[:stmt].close }
|
||||
@statements.clear
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user