Created
May 24, 2011 10:25
-
-
Save nicktelford/988485 to your computer and use it in GitHub Desktop.
goto loop in libmemcached - criminal!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test_connect: | |
if (connect(ptr->fd, | |
(struct sockaddr *)&servAddr, | |
sizeof(servAddr)) < 0) | |
{ | |
switch (errno) | |
{ | |
case EINPROGRESS: | |
case EALREADY: | |
case EINTR: | |
goto test_connect; | |
case EISCONN: /* We were spinning waiting on connect */ | |
break; | |
default: | |
WATCHPOINT_ERRNO(errno); | |
ptr->cached_errno= errno; | |
return MEMCACHED_ERRNO; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment