Skip to content

Fix connGetSocketError usage#7811

Merged
yossigo merged 1 commit intoredis:unstablefrom
zhouyixiang:unstable
Sep 22, 2020
Merged

Fix connGetSocketError usage#7811
yossigo merged 1 commit intoredis:unstablefrom
zhouyixiang:unstable

Conversation

@zhouyixiang
Copy link
Contributor

@zhouyixiang zhouyixiang commented Sep 18, 2020

Method connGetSocketError is designed to return error status of the socket.

When the getsockopt method in connGetSocketError is invoked successfully, and the socket does have error, errno won't be updated. Assigning errno to connection error here is misleading. As connectGetSocketError can get socket error number by getsockopt and return it, we should record the returned value instead.

@oranagra oranagra requested a review from yossigo September 19, 2020 09:12
@yossigo yossigo merged commit b96c359 into redis:unstable Sep 22, 2020
oranagra pushed a commit that referenced this pull request Oct 27, 2020
JackieXie168 pushed a commit to JackieXie168/redis that referenced this pull request Nov 4, 2020
jschmieg pushed a commit to memKeyDB/memKeyDB that referenced this pull request Nov 6, 2020
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

Successfully merging this pull request may close these issues.

2 participants