server->fd= INVALID_SOCKET;
continue;
+ case ECONNREFUSED:
+ // Probably not running service
+
default:
break;
}
return rc;
}
-memcached_return_t memcached_connect_try(org::libmemcached::Instance* server)
-{
- if (server and server->root and server->root->state.is_parsing)
- {
- return MEMCACHED_SUCCESS;
- }
-
- return _memcached_connect(server, false);
-}
-
memcached_return_t memcached_connect(org::libmemcached::Instance* server)
{
return _memcached_connect(server, true);
#pragma once
-memcached_return_t memcached_connect_try(org::libmemcached::Instance*);
memcached_return_t memcached_connect(org::libmemcached::Instance*);
-
memcached_io_init_udp_header(self, 0);
}
- if (memc)
- {
- memcached_connect_try(self);
- }
-
return self;
}
{
char buffer[SMALL_STRING_LEN];
int length;
- char *ret;
*error= MEMCACHED_SUCCESS;
return NULL;
}
- ret= static_cast<char *>(libmemcached_malloc(ptr, (size_t) (length + 1)));
+ // User is responsible for free() memory, so use malloc()
+ char *ret= static_cast<char *>(malloc(size_t(length +1)));
memcpy(ret, buffer, (size_t) length);
ret[length]= '\0';