Skip to content

redisLibuvPoll crash when server closes the connetion #545

Closed
@mannol

Description

@mannol

When server closes the connection, either by shutting down or some protocol irregularity, the libuv adapter crashes in redisLibuvPoll() when calling redisAsyncHandleWrite(). Reason for the crash is that the prior call to redisAsyncHandleRead() frees the context.

I have solved it by placing redisAsyncHandleWrite() before redisAsyncHandleRead(), however, considering that this happens because redisBufferRead(c) == REDIS_ERR causes the __redisAsyncDisconnect(ac) call, the better solution would be to make redisAsyncHandleRead() and redisAsyncHandleWrite() return status.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions