add nodelay option in socketchannel

This commit is contained in:
Cloud Wu
2014-10-13 20:58:41 +08:00
parent 883757b936
commit a074cd79bd
3 changed files with 8 additions and 0 deletions

View File

@@ -84,6 +84,7 @@ function redis.connect(db_conf)
host = db_conf.host,
port = db_conf.port or 6379,
auth = redis_login(db_conf.auth, db_conf.db),
nodelay = true,
}
-- try connect first only once
channel:connect(true)
@@ -199,6 +200,7 @@ function redis.watch(db_conf)
host = db_conf.host,
port = db_conf.port or 6379,
auth = watch_login(obj, db_conf.auth),
nodelay = true,
}
obj.__sock = channel