mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 05:37:39 +03:00
util.sql: Return failure if set_encoding() fails
This commit is contained in:
parent
0fc9766334
commit
9f5bd334c5
1 changed files with 4 additions and 1 deletions
|
@ -110,7 +110,10 @@ function engine:connect()
|
|||
dbh:autocommit(false); -- don't commit automatically
|
||||
self.conn = dbh;
|
||||
self.prepared = {};
|
||||
self:set_encoding();
|
||||
local ok, err = self:set_encoding();
|
||||
if not ok then
|
||||
return ok, err;
|
||||
end
|
||||
local ok, err = self:onconnect();
|
||||
if ok == false then
|
||||
return ok, err;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue