mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
core: fix server response handling to prevent connection timeouts
This commit is contained in:
parent
9c5f94bd66
commit
d5a506d4ae
1 changed files with 6 additions and 0 deletions
|
|
@ -125,6 +125,12 @@ export namespace Server {
|
|||
async (c) => {
|
||||
log.info("global event connected")
|
||||
return streamSSE(c, async (stream) => {
|
||||
stream.writeSSE({
|
||||
data: JSON.stringify({
|
||||
type: "server.connected",
|
||||
properties: {},
|
||||
}),
|
||||
})
|
||||
async function handler(event: any) {
|
||||
await stream.writeSSE({
|
||||
data: JSON.stringify(event),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue