fix: fix "[DONE is not valid JSON" (#57)

This commit is contained in:
JustSong committed 2023-05-14 12:48:42 +08:00
1 parent 1507dd0104
commit 05e460d9f8
1 file changed
+1 -1
+1 -1
View File
@@ -210,7 +210,7 @@ func relayHelper(c *gin.Context) error {
select {
case data := <-dataChan:
if strings.HasPrefix(data, "data: [DONE]") {
data = data[:len(data)-1]
data = "data: [DONE]"
}
c.Render(-1, common.CustomEvent{Data: data})
return true