Commit a0c7278
committed
Fix crash in SSE Handler
2026/02/15 22:41:29 API.SSE Write timeout
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x674385]
goroutine 1588563 [running]:
bufio.(*Writer).Flush(0x1f4f9510ef80)
/usr/local/go/src/bufio/bufio.go:642 +0x45
net/http.(*response).FlushError(0x1f4f96cc61e0)
/usr/local/go/src/net/http/server.go:1728 +0x33
net/http.(*response).Flush(0xad3720?)
/usr/local/go/src/net/http/server.go:1721 +0x13
github.com/glimesh/broadcast-box/internal/server/handlers.sseHandler.func1()
/broadcast-box/internal/server/handlers/sse.go:70 +0xc8
created by github.com/glimesh/broadcast-box/internal/server/handlers.sseHandler in goroutine 1519769
/broadcast-box/internal/server/handlers/sse.go:67 +0x6e51 parent cd8fdb0 commit a0c7278
1 file changed
Lines changed: 20 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
63 | | - | |
64 | | - | |
65 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
66 | 69 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
74 | 79 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
79 | 84 | | |
80 | | - | |
81 | 85 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
0 commit comments