we should set io timeout only if we have something to send
@@ -1158,7 +1158,9 @@ void finalostream_send(h2o_ostream_t *_self, h2o_req_t *_req, h2o_sendvec_t *inb
if (conn->_ostr_final.chunked_buf != NULL && chunked_suffix.len != 0)
bufs[bufcnt++] = chunked_suffix;
+ if (bufcnt != 0)
set_req_io_timeout(conn, conn->super.ctx->globalconf->http1.req_io_timeout, req_io_on_timeout);
+
h2o_socket_write(conn->sock, bufs, bufcnt, h2o_send_state_is_in_progress(send_state) ? on_send_next : on_send_complete);
}
