mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
bugfix: auth before connected
This commit is contained in:
@@ -89,6 +89,8 @@ function redis.connect(dbname)
|
||||
port = db_conf.port or 6379,
|
||||
auth = redis_login(db_conf.auth, db_conf.db),
|
||||
}
|
||||
-- try connect first
|
||||
channel:connect()
|
||||
return setmetatable( { channel }, meta )
|
||||
end
|
||||
|
||||
@@ -180,6 +182,8 @@ function redis.watch(dbname)
|
||||
}
|
||||
obj.__sock = channel
|
||||
|
||||
-- try connect first
|
||||
channel:connect()
|
||||
return setmetatable( obj, watchmeta )
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user