Client side timeout now just triggers if there is period long enough
where the server doesn't send updates. This works just because the
server is not pushing the updates properly.
The client must timeout BOTH if the server is unresponsive AND if
the server sends updates but the overall elapsed time exceedes.
bool completed:1;
};
+static void fts_indexer_idle_timeout(struct connection *conn);
+
static void fts_indexer_notify(struct fts_indexer_context *ctx)
{
unsigned long long elapsed_msecs, est_total_msecs;
return -1;
}
ctx->percentage = percentage;
+ time_t elapsed = ioloop_time - ctx->search_start_time.tv_sec;
if (ctx->percentage == 100)
ctx->completed = TRUE;
+ else if (ctx->conn.input_idle_timeout_secs > 0 &&
+ elapsed > ctx->conn.input_idle_timeout_secs) {
+ fts_indexer_idle_timeout(&ctx->conn);
+ return -1;
+ }
return 1;
}