Nit: use a helper function to know if we are writing
@@ -413,7 +413,7 @@ static void stream_send_error(h2o_http2_conn_t *conn, uint32_t stream_id, int er
static void request_gathered_write(h2o_http2_conn_t *conn)
{
assert(conn->state < H2O_HTTP2_CONN_STATE_IS_CLOSING);
- if (conn->sock->_cb.write == NULL && !h2o_timer_is_linked(&conn->_write.timeout_entry)) {
+ if (!h2o_socket_is_writing(conn->sock) && !h2o_timer_is_linked(&conn->_write.timeout_entry)) {
h2o_timer_link(conn->super.ctx->loop, 0, &conn->_write.timeout_entry);
}
}
