switch (errno)
{
case EAGAIN:
+ case EINTR:
{
memcached_return rc;
memcached_return memcached_io_close(memcached_server_st *ptr)
{
int r;
- /* in case of death shutdown to avoid blocking at close() */
+ if (ptr->fd == -1)
+ return MEMCACHED_SUCCESS;
+
+ /* in case of death shutdown to avoid blocking at close() */
r= shutdown(ptr->fd, SHUT_RDWR);
#ifdef HAVE_DEBUG
if (r && errno != ENOTCONN)
{
+ WATCHPOINT_NUMBER(ptr->fd);
WATCHPOINT_ERRNO(errno);
WATCHPOINT_ASSERT(errno);
}
#endif
r= close(ptr->fd);
- WATCHPOINT_ASSERT(r == 0);
+#ifdef HAVE_DEBUG
+ if (r != 0)
+ WATCHPOINT_ERRNO(errno);
+#endif
return MEMCACHED_SUCCESS;
}
}
WATCHPOINT_ASSERT(write_length == 0);
- WATCHPOINT_ASSERT(return_length == ptr->write_buffer_offset);
+ // Need to study this assert() WATCHPOINT_ASSERT(return_length ==
+ // ptr->write_buffer_offset);
ptr->write_buffer_offset= 0;
return return_length;