We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently it is not possible pass AbortController signal to a client. It would be immensely useful to support that in streaming HTTP handlers.
Example:
http.serve(async (req: Request) => { const redis = await connect({ hostname: "127.0.0.1", signal: req.signal }) const events = new http.ServerSentEventStreamTarget({ keepAlive: true }) while (true) { const [stream] = await redis.xread([ { key: `worker:${id}:events`, xid: "*" }, ]) // Send events from a stream. } return events.asResponse() })
The text was updated successfully, but these errors were encountered:
Current solution:
const redis = await connect({ hostname: "127.0.0.1", }) req.signal.addEventListener("abort", () => { redis.close() })
Sorry, something went wrong.
No branches or pull requests
Currently it is not possible pass AbortController signal to a client. It would be immensely useful to support that in streaming HTTP handlers.
Example:
The text was updated successfully, but these errors were encountered: