Description
Bernhard Frauendienst opened SPR-13104 and commented
As discussed in #16826, request handler methods returning a ResponseBodyEmitter (or a subclass like SseEmitter) have no way of specifying a request-specific timeout to be set on the request's AsyncContext. The only way to specify that timeout is using the global default value.
However, most ResponseBodyEmitter connections are explicitly created to be long-running, especially in the Server-Sent Event case (SseEmitter), where the connection is created as an async back-channel to the client.
As such, those request handlers will in most cases want to set a much higher timeout value than the one appropriate for single-result async tasks.
Therefore, the possibility to specify a per-request timeout value should be added to the ResponseBodyEmitter (probably similar to the property in DeferredResult).
Affects: 4.2 RC1
Issue Links:
- HTTP Streaming and Server-Sent Events (SSE) [SPR-12212] #16826 HTTP Streaming and Server-Sent Events (SSE)
- SseEmitter does not expose super constructor with timeout value [SPR-13446] #18026 SseEmitter does not expose super constructor with timeout value