Fixes a bug in non blocking connect call
This patch fixes a bug in non blocking connect call where the sock option length for SO_ERROR was passed as 0 instead of sizeof(int).
This commit is contained in:

committed by
Marcelo Roberto Jimenez

parent
4d21d45da7
commit
6db2271ac3
@@ -126,7 +126,7 @@ static int Check_Connect_And_Wait_Connection(
|
||||
#ifndef WIN32
|
||||
} else {
|
||||
int valopt = 0;
|
||||
socklen_t len = 0;
|
||||
socklen_t len = sizeof(valopt);
|
||||
if (getsockopt(sock, SOL_SOCKET, SO_ERROR, (void *) &valopt, &len) < 0) {
|
||||
/* failed to read delayed error */
|
||||
return -1;
|
||||
|
Reference in New Issue
Block a user