return;
}
- uv_handle_t *client = { 0 };
+ uv_handle_t *client;
if (io_create(master->loop, &client, SOCK_STREAM, AF_UNSPEC)) {
return;
}
uv_tcp_t *tcp = malloc(sizeof(uv_tcp_t));
kr_require(tcp);
ret = uv_tcp_init_ex(loop, tcp, family);
- uv_tcp_nodelay(tcp, 1);
-
+ if (ret != 0) {
+ uv_tcp_nodelay(tcp, 1);
+ }
*handle = (uv_handle_t *)tcp;
} else {
kr_require(false && "io_create: invalid socket type");
}
/* Create connection for iterative query */
- uv_handle_t *handle = { 0 };
+ uv_handle_t *handle;
if (io_create(the_worker->loop, &handle, socktype, family)) {
return NULL;
}