h2_rx_goaway(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
{

	CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
	ASSERT_RXTHR(h2);
	CHECK_OBJ_NOTNULL(r2, H2_REQ_MAGIC);
	assert(r2 == h2->req0);

	h2->goaway_last_stream = vbe32dec(h2->rxf_data);
	h2->error = h2_connectionerror(vbe32dec(h2->rxf_data + 4));
	Lck_Lock(&h2->sess->mtx);
	VSLb(h2->vsl, SLT_Debug, "GOAWAY %s", h2->error->name);
	Lck_Unlock(&h2->sess->mtx);
	return (h2->error);
}
h2_rx_goaway(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
{

	CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
	ASSERT_RXTHR(h2);
	CHECK_OBJ_NOTNULL(r2, H2_REQ_MAGIC);
	assert(r2 == h2->req0);

	h2->goaway_last_stream = vbe32dec(h2->rxf_data);
	h2->error = h2_connectionerror(vbe32dec(h2->rxf_data + 4));
	Lck_Lock(&h2->sess->mtx);
	VSLb(h2->vsl, SLT_Debug, "GOAWAY %s", h2->error->name);
	Lck_Unlock(&h2->sess->mtx);
	return (h2->error);
}