Commit 690d980
authored
Cork the timer writes in ServerSentEvents.js example (#1307)
The interval callback writes to the response outside of any uWS callback, so every event printed "Warning: uWS.HttpResponse writes must be made from within a corked callback". Wrap the write in res.cork(), the same way VideoStreamer.js was fixed.1 parent 95b1a7e commit 690d980
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| |||
0 commit comments