Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hiredis error #231

Open
lilothar opened this issue Sep 29, 2016 · 0 comments
Open

hiredis error #231

lilothar opened this issue Sep 29, 2016 · 0 comments

Comments

@lilothar
Copy link

hiredis 模块又一个小问题,redis启动,正常链接时候没什么问题,如果redis没有启动,会出现一直pollhup日志,这个问题我觉得主要在hiredis封装设置channel时没有设置closecallback导致,句柄一直没有删掉,
我尝试给hiredis模块增加一个handclose函数,如下
void Hiredis::handleClose()
{
::redisAsyncHandleRead(_context);
}

setchannel时做下如下操作
_channel->setCloseCallback(std::bind(&Hiredis::handleClose, this));

这样问解决了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant