mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 04:33:05 +00:00
minor fix
This commit is contained in:
@@ -20,8 +20,7 @@ local meta = {
|
|||||||
|
|
||||||
function redis.connect(dbname)
|
function redis.connect(dbname)
|
||||||
local db_conf = name[dbname]
|
local db_conf = name[dbname]
|
||||||
local fd = socket.open(db_conf.host, db_conf.port or 6379)
|
local fd = assert(socket.open(db_conf.host, db_conf.port or 6379))
|
||||||
assert(fd)
|
|
||||||
local r = setmetatable( { __handle = fd, __mode = false }, meta )
|
local r = setmetatable( { __handle = fd, __mode = false }, meta )
|
||||||
if db_conf.db ~= nil then
|
if db_conf.db ~= nil then
|
||||||
r:select(db_conf.db)
|
r:select(db_conf.db)
|
||||||
|
|||||||
Reference in New Issue
Block a user