+ * Change of behavior where linger is only modified for no-block and then
+ it is set to zero.
* Added Twitter's memcached_server_error() functions.
* Fix for OSX compiles in development builds.
* Updated C++ interface.
temp_flag= MEM_USE_SORT_HOSTS;
break;
case MEMCACHED_BEHAVIOR_POLL_TIMEOUT:
- {
- return (uint64_t)ptr->poll_timeout;
- }
+ return (uint64_t)ptr->poll_timeout;
case MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT:
- {
- return (uint64_t)ptr->connect_timeout;
- }
+ return (uint64_t)ptr->connect_timeout;
case MEMCACHED_BEHAVIOR_RETRY_TIMEOUT:
- {
- return (uint64_t)ptr->retry_timeout;
- }
+ return (uint64_t)ptr->retry_timeout;
case MEMCACHED_BEHAVIOR_SND_TIMEOUT:
return (uint64_t)ptr->snd_timeout;
case MEMCACHED_BEHAVIOR_RCV_TIMEOUT:
}
#endif
+ if (ptr->root->flags & MEM_NO_BLOCK)
{
int error;
struct linger linger;
linger.l_onoff= 1;
- linger.l_linger= MEMCACHED_DEFAULT_TIMEOUT;
+ linger.l_linger= 0; /* By default on close() just drop the socket */
error= setsockopt(ptr->fd, SOL_SOCKET, SO_LINGER,
&linger, (socklen_t)sizeof(struct linger));
WATCHPOINT_ASSERT(error == 0);