iochan_man_t iochan_man)
{
struct connection *co;
+ int ret;
co = xmalloc(sizeof(*co));
co->operation_timeout = operation_timeout;
co->session_timeout = session_timeout;
- connection_connect(co, iochan_man);
-
+ ret = connection_connect(co, iochan_man);
connection_use(1);
+ if (ret)
+ { /* error */
+ connection_destroy(co);
+ co = 0;
+ }
return co;
}
{
struct client *cl = co->client;
if (cl)
- {
- client_check_preferred_watch(cl);
client_got_records(cl);
- }
}
}