projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
00266c3
)
util.sql: Allow onconnect callback to fail connection to the DB by returning false...
author
Matthew Wild
<mwild1@gmail.com>
Tue, 7 Jul 2015 16:43:14 +0000
(17:43 +0100)
committer
Matthew Wild
<mwild1@gmail.com>
Tue, 7 Jul 2015 16:43:14 +0000
(17:43 +0100)
util/sql.lua
patch
|
blob
|
history
diff --git
a/util/sql.lua
b/util/sql.lua
index 92032f433556e1555c6aaad209ad2190612ff227..dedef435c3534364ec1cb80e746cfc8651965a34 100644
(file)
--- a/
util/sql.lua
+++ b/
util/sql.lua
@@
-111,7
+111,10
@@
function engine:connect()
self.conn = dbh;
self.prepared = {};
self:set_encoding();
- self:onconnect();
+ local ok, err = self:onconnect();
+ if ok == false then
+ return ok, err;
+ end
return true;
end
function engine:onconnect()