3 memcached_return_t
memcached_flush_buffers(memcached_st
*memc
)
5 memcached_return_t ret
= MEMCACHED_SUCCESS
;
7 for (uint32_t x
= 0; x
< memcached_server_count(memc
); ++x
)
9 memcached_server_instance_st
*instance
=
10 memcached_server_instance_fetch(memc
, x
);
12 if (instance
->write_buffer_offset
!= 0)
14 if (instance
->fd
== -1 &&
15 (ret
= memcached_connect(instance
)) != MEMCACHED_SUCCESS
)
17 WATCHPOINT_ERROR(ret
);
20 if (memcached_io_write(instance
, NULL
, 0, true) == -1)
21 ret
= MEMCACHED_SOME_ERRORS
;