projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Fix for bad name servers.
[awesomized/libmemcached]
/
libmemcached
/
io.c
diff --git
a/libmemcached/io.c
b/libmemcached/io.c
index 616ad497b9798147229106c4c459788ccb11f913..070af6b19462d9056f7a3181ba4944e26ae7b9cf 100644
(file)
--- a/
libmemcached/io.c
+++ b/
libmemcached/io.c
@@
-64,20
+64,25
@@
static memcached_return_t io_wait(memcached_server_write_instance_st ptr,
case 1:
return MEMCACHED_SUCCESS;
case 0:
case 1:
return MEMCACHED_SUCCESS;
case 0:
- return MEMCACHED_TIMEOUT;
-#ifdef TARGET_OS_LINUX
- case ERESTART:
-#endif
- case EINTR:
continue;
default:
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;
/* Imposssible for anything other then -1 */
WATCHPOINT_ASSERT(error == -1);
ptr->cached_errno= error;
@@
-583,6
+588,7
@@
static ssize_t io_flush(memcached_server_write_instance_st ptr,
if (sent_length == -1)
{
ptr->cached_errno= errno;
if (sent_length == -1)
{
ptr->cached_errno= errno;
+ WATCHPOINT_ERRNO(errno);
switch (errno)
{
case ENOBUFS:
switch (errno)
{
case ENOBUFS: