projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Commit additional test for remote...
[awesomized/libmemcached]
/
libmemcached
/
io.c
diff --git
a/libmemcached/io.c
b/libmemcached/io.c
index 0cef65f04b0018b869f451caeb2006428dd7a0bd..3b5d44f570e2003313963a6c70a1600287f382ba 100644
(file)
--- a/
libmemcached/io.c
+++ b/
libmemcached/io.c
@@
-12,6
+12,8
@@
#include "common.h"
#include "common.h"
+#include <assert.h>
+
typedef enum {
MEM_READ,
MEM_WRITE
typedef enum {
MEM_READ,
MEM_WRITE
@@
-617,6
+619,7
@@
static ssize_t io_flush(memcached_server_write_instance_st ptr,
if (ptr->type == MEMCACHED_CONNECTION_UDP)
increment_udp_message_id(ptr);
if (ptr->type == MEMCACHED_CONNECTION_UDP)
increment_udp_message_id(ptr);
+ assert(ptr->fd != -1);
sent_length= send(ptr->fd, local_write_ptr, write_length, 0);
if (sent_length == SOCKET_ERROR)
{
sent_length= send(ptr->fd, local_write_ptr, write_length, 0);
if (sent_length == SOCKET_ERROR)
{
@@
-654,10
+657,14
@@
static ssize_t io_flush(memcached_server_write_instance_st ptr,
fprintf(stderr, "%s:%d (%s)\n", __FILE__, __LINE__,__func__);fflush(stdout);
return -1;
}
fprintf(stderr, "%s:%d (%s)\n", __FILE__, __LINE__,__func__);fflush(stdout);
return -1;
}
+ case ENOTCONN:
+ case EPIPE:
default:
default:
+ fprintf(stderr, "%s %u %u %u\n", ptr->hostname, ptr->port, ptr->io_bytes_sent, ptr->server_failure_counter);
+ fprintf(stderr, "%s:%d (%s)(%s)\n", __FILE__, __LINE__,__func__, strerror(errno));fflush(stdout);
memcached_quit_server(ptr, true);
*error= MEMCACHED_ERRNO;
memcached_quit_server(ptr, true);
*error= MEMCACHED_ERRNO;
-
fprintf(stderr, "%s:%d (%s)(%s)\n", __FILE__, __LINE__,__func__, strerror(errno));fflush(stdout
);
+
assert(ptr->fd == -1
);
return -1;
}
}
return -1;
}
}