提交 d48add71 编写于 作者: H Hemant Kumar

close statment only if its not closed

上级 985ace4d
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册