case 1:
return MEMCACHED_SUCCESS;
case 0:
- return MEMCACHED_TIMEOUT;
-#ifdef TARGET_OS_LINUX
- case ERESTART:
-#endif
- case EINTR:
continue;
default:
- ptr->cached_errno= error;
- memcached_quit_server(ptr, true);
+ WATCHPOINT_ERRNO(errno);
+ {
+ switch (errno)
+ {
+ default:
+ ptr->cached_errno= error;
+ memcached_quit_server(ptr, true);
- return MEMCACHED_FAILURE;
+ return MEMCACHED_FAILURE;
+ }
+ }
}
}
+ if (loop_max == 0 && error == 0)
+ return MEMCACHED_TIMEOUT;
+
/* Imposssible for anything other then -1 */
WATCHPOINT_ASSERT(error == -1);
ptr->cached_errno= error;
if (sent_length == -1)
{
ptr->cached_errno= errno;
+ WATCHPOINT_ERRNO(errno);
switch (errno)
{
case ENOBUFS: