The trick is to set a 1 second timeout on the channel.
client_set_connection(cl, 0);
}
+void client_mark_dead(struct client *cl)
+{
+ if (cl->connection)
+ connection_mark_dead(cl->connection);
+}
+
// Initialize CCL map for a target
static CCL_bibset prepare_cclmap(struct client *cl, CCL_bibset base_bibset)
{
void client_set_connection(struct client *cl, struct connection *con);
void client_disconnect(struct client *cl);
+void client_mark_dead(struct client *cl);
int client_prep_connection(struct client *cl,
int operation_timeout, int session_timeout,
iochan_man_t iochan,
return co->link;
}
+void connection_mark_dead(struct connection *co)
+{
+ iochan_settimeout(co->iochan, 1);
+}
+
// Close connection and recycle structure
static void connection_destroy(struct connection *co)
{
ZOOM_connection connection_get_link(struct connection *co);
void connection_continue(struct connection *co);
+void connection_mark_dead(struct connection *co);
#endif
client_lock(l->client);
client_set_session(l->client, 0);
client_set_database(l->client, 0);
+ client_mark_dead(l->client);
client_unlock(l->client);
client_destroy(l->client);
xfree(l);