if (s->proxy->clitimeout) {
tv_delayfrom(&s->cwexpire, &now, s->proxy->clitimeout);
- /* FIXME: to avoid the client to read-time-out during writes, we refresh it */
+ /* FIXME: to prevent the client from expiring read timeouts during writes,
+ * we refresh it. A solution would be to merge read+write timeouts into a
+ * unique one, although that needs some study particularly on full-duplex
+ * TCP connections. */
s->crexpire = s->cwexpire;
}
else
if (s->srv_state != SV_STCONN) {
if (s->proxy->srvtimeout) {
tv_delayfrom(&s->swexpire, &now, s->proxy->srvtimeout);
- /* FIXME: to avoid the server to read-time-out during writes, we refresh it */
+ /* FIXME: to prevent the server from expiring read timeouts during writes,
+ * we refresh it. A solution would be to merge read+write+connect timeouts
+ * into a unique one since we don't mind expiring on read or write, and none
+ * of them is enabled while waiting for connect(), although that needs some
+ * study particularly on full-duplex TCP connections. */
s->srexpire = s->swexpire;
}
else
t->logs.t_request = tv_diff(&t->logs.tv_accept, &now);
/* FIXME: we'll set the client in a wait state while we try to
* connect to the server. Is this really needed ? wouldn't it be
- * better to release the maximum of system buffers instead ? */
+ * better to release the maximum of system buffers instead ?
+ * The solution is to enable the FD but set its time-out to
+ * eternity as long as the server-side does not enable data xfer.
+ * CL_STDATA also has to take care of this, which is done below.
+ */
//FD_CLR(t->cli_fd, StaticReadEvent);
//tv_eternity(&t->crexpire);
FD_SET(t->cli_fd, StaticWriteEvent); /* restart writing */
if (t->proxy->clitimeout) {
tv_delayfrom(&t->cwexpire, &now, t->proxy->clitimeout);
- /* FIXME: to avoid the client to read-time-out during writes, we refresh it */
+ /* FIXME: to prevent the client from expiring read timeouts during writes,
+ * we refresh it. */
t->crexpire = t->cwexpire;
}
else
FD_SET(t->cli_fd, StaticWriteEvent); /* restart writing */
if (t->proxy->clitimeout) {
tv_delayfrom(&t->cwexpire, &now, t->proxy->clitimeout);
- /* FIXME: to avoid the client to read-time-out during writes, we refresh it */
+ /* FIXME: to prevent the client from expiring read timeouts during writes,
+ * we refresh it. */
t->crexpire = t->cwexpire;
}
else
FD_SET(t->srv_fd, StaticWriteEvent);
if (t->proxy->srvtimeout) {
tv_delayfrom(&t->swexpire, &now, t->proxy->srvtimeout);
- /* FIXME: to avoid the server to read-time-out during writes, we refresh it */
+ /* FIXME: to prevent the server from expiring read timeouts during writes,
+ * we refresh it. */
t->srexpire = t->swexpire;
}
else
FD_SET(t->srv_fd, StaticWriteEvent); /* restart writing */
if (t->proxy->srvtimeout) {
tv_delayfrom(&t->swexpire, &now, t->proxy->srvtimeout);
- /* FIXME: to avoid the server to read-time-out during writes, we refresh it */
+ /* FIXME: to prevent the server from expiring read timeouts during writes,
+ * we refresh it. */
t->srexpire = t->swexpire;
}
else
FD_SET(t->srv_fd, StaticWriteEvent); /* restart writing */
if (t->proxy->srvtimeout) {
tv_delayfrom(&t->swexpire, &now, t->proxy->srvtimeout);
- /* FIXME: to avoid the server to read-time-out during writes, we refresh it */
+ /* FIXME: to prevent the server from expiring read timeouts during writes,
+ * we refresh it. */
t->srexpire = t->swexpire;
}
else
FD_SET(t->srv_fd, StaticWriteEvent); /* restart writing */
if (t->proxy->srvtimeout) {
tv_delayfrom(&t->swexpire, &now, t->proxy->srvtimeout);
- /* FIXME: to avoid the server to read-time-out during writes, we refresh it */
+ /* FIXME: to prevent the server from expiring read timeouts during writes,
+ * we refresh it. */
t->srexpire = t->swexpire;
}
else