bool always true in Socket.cpp,v 1.51 2003/11/11 20:31:57

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

Locked
DHCallahan
Posts: 3
Joined: 2003-11-24 19:39

bool always true in Socket.cpp,v 1.51 2003/11/11 20:31:57

Post by DHCallahan » 2003-12-16 12:46

ines 152 to 162 of Socket.cpp:

Code: Select all

bool blocking = true;
if(::connect(sock,(sockaddr*)&serv_addr,sizeof(serv_addr)) == SOCKET_ERROR) {
// EWOULDBLOCK is ok, the attempt is still being made, and FD_CONNECT will be signaled...
if(errno != EWOULDBLOCK) {
checksockerr(SOCKET_ERROR);
} else {
blocking = true;
}
}
if(blocking)
connected = true;
the bool variable 'blocking' is always equal to true. Is this a mistake or are things being kept like this for later "adjustment" ? :?

Locked