Closed zhangjh closed 7 years ago
My test code is :
const redis = require("redis"); const client = redis.createClient( PORT,SERVER ); client.on("error", function (err) { console.log("Error " + err); }); client.smembers("test",function(err,reply) { if(err){ console.error(err); return; } console.log(reply); if (!reply.length) { redis.sadd("test", "1"); } }); client.quit()
It output "[]",but expectedly,it will output "1". Am i wrong?
my redis version : redis-cli 3.2.100
redis-cli 3.2.100
Fixed,maybe I disconnet the connetion too early
My test code is :
It output "[]",but expectedly,it will output "1". Am i wrong?