reko
How to wait for streamSse to finish?
I am using hono's
streamSSE
helper to stream responses, which works great. However it seems that the streamSSE
returns right away, and I have no way to await when the streaming is done. I have a middleware that collects metrics such as http request timings, and the middleware also returns immediately from await next()
instead of waiting the streaming to be done, so the timings are completely wrong.
Is there any way, in the middleware, to wait for the streaming to be done?13 replies