anetNonBlock(NULL,fd);
anetTcpNoDelay(NULL,fd);
- if (!c) return NULL;
if (aeCreateFileEvent(server.el,fd,AE_READABLE,
readQueryFromClient, c) == AE_ERR)
{
}
void addReplyLongLong(redisClient *c, long long ll) {
- _addReplyLongLong(c,ll,':');
+ if (ll == 0)
+ addReply(c,shared.czero);
+ else if (ll == 1)
+ addReply(c,shared.cone);
+ else
+ _addReplyLongLong(c,ll,':');
}
void addReplyMultiBulkLen(redisClient *c, long length) {