Fix. connected method on LuaSQL backend.

This commit is contained in:
Alexey Melnichuk
2016-02-20 15:20:38 +03:00
parent 80746dbe3b
commit 6035d4033c

View File

@@ -94,7 +94,11 @@ function LuaSQLDatabase:release()
end
function LuaSQLDatabase:connected()
return self._dbh and self._dbh:connected()
if not self._dbh then
return false
end
local str = tostring(self._dbh)
return not string.find(str, 'closed')
end
end