int conn_err;
DPRINTF(stderr,"process_srv: c=%s s=%s set(r,w)=%d,%d exp(r,w)=%u,%u\n",
- cli_stnames[c], srv_stnames[s],
+ cli_stnames[t->cli_state], srv_stnames[t->srv_state],
EV_FD_ISSET(t->srv_fd, DIR_RD), EV_FD_ISSET(t->srv_fd, DIR_WR),
rep->rex, req->wex);
* have at least read something.
*/
- if (b->flags & BF_PARTIAL_READ)
+ if (b->rex && b->flags & BF_PARTIAL_READ)
b->rex = tick_add_ifset(now_ms, b->rto);
out_wakeup:
* written something.
*/
- if (b->flags & BF_PARTIAL_WRITE) {
+ if (b->wex && b->flags & BF_PARTIAL_WRITE) {
b->wex = tick_add_ifset(now_ms, b->wto);
if (b->wex) {
/* 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. */
- if (!(b->flags & BF_SHUTR_STATUS))
+ if (b->rex && !(b->flags & BF_SHUTR_STATUS))
b->rex = b->wex;
}
}