| 1671 | } |
| 1672 | |
| 1673 | static void ev_stream_closed(h2_session *session, h2_stream *stream) |
| 1674 | { |
| 1675 | apr_bucket *b; |
| 1676 | |
| 1677 | if (H2_STREAM_CLIENT_INITIATED(stream->id) |
| 1678 | && (stream->id > session->local.completed_max)) { |
| 1679 | session->local.completed_max = stream->id; |
| 1680 | } |
| 1681 | /* The stream might have data in the buffers of the main connection. |
| 1682 | * We can only free the allocated resources once all had been written. |
| 1683 | * Send a special buckets on the connection that gets destroyed when |
| 1684 | * all preceding data has been handled. On its destruction, it is safe |
| 1685 | * to purge all resources of the stream. */ |
| 1686 | ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, session->c1, |
| 1687 | H2_STRM_MSG(stream, "adding h2_eos to c1 out")); |
| 1688 | b = h2_bucket_eos_create(session->c1->bucket_alloc, stream); |
| 1689 | APR_BRIGADE_INSERT_TAIL(session->bbtmp, b); |
| 1690 | h2_c1_io_append(&session->io, session->bbtmp); |
| 1691 | apr_brigade_cleanup(session->bbtmp); |
| 1692 | } |
| 1693 | |
| 1694 | static void on_stream_state_enter(void *ctx, h2_stream *stream) |
| 1695 | { |
no test coverage detected