-
-
Notifications
You must be signed in to change notification settings - Fork 461
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What version of Elysia is running?
1.4.22
What platform is your computer?
Darwin 25.3.0 arm64 arm
What environment are you using
bun 1.3.7
Are you using dynamic mode?
No
What steps can reproduce the bug?
import Elysia, { sse } from "elysia";
new Elysia({ aot: true })
.trace(() => {})
.onAfterHandle(() => {})
.get("/sse", async function* () {
yield sse({ event: "test", data: "1" });
yield sse({ event: "test", data: "2" });
yield sse({ event: "test", data: "3" });
yield sse({ event: "test", data: "4" });
yield sse({ event: "test", data: "5" });
yield sse({ event: "test", data: "6" });
})
.listen(3000);
console.log("Server running on http://localhost:3000");
console.log("");
console.log("Test with: curl -N http://localhost:3000/sse");
console.log("");
console.log("Expected: events 1, 2, 3, 4, 5, 6");
console.log("Actual: events 2, 4, 6 (ODD events are dropped, EVEN make it through)");What is the expected behavior?
$ curl -N http://localhost:3000/sse
event: test
data: 1
event: test
data: 2
event: test
data: 3
event: test
data: 4
event: test
data: 5
event: test
data: 6
What do you see instead?
$curl -N http://localhost:3000/sse
event: test
data: 2
event: test
data: 4
event: test
data: 6
Additional information
- Using
{ aot: false }makes the bug go away. - Using either
.trace()alone or.onAfterHandle()alone also makes the bug go away
Have you try removing the node_modules and bun.lockb and try again yet?
Yes
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working