Alanxtl commented on code in PR #674: URL: https://github.com/apache/dubbo-go-pixiu/pull/674#discussion_r2083097231
########## pkg/common/http/manager.go: ########## @@ -178,6 +178,12 @@ func (hcm *HttpConnectionManager) writeResponse(c *pch.HttpContext) { _ = res.Stream.Close() return } + // For non-SSE streams, we need to flush after each write + if !res.IsSSE() { + if flusher, ok := c.Writer.(stdHttp.Flusher); ok { + flusher.Flush() + } + } Review Comment: 这里其实不管是sse还是streamable http都要flush,之前没加上是我实现的疏忽。 ########## pkg/client/response.go: ########## @@ -34,21 +35,30 @@ func (r *UnaryResponse) IsStream() bool { return false } +func (r *UnaryResponse) IsSSE() bool { + return false +} + Review Comment: 如果都要flush的话这个函数是不是就没有必要了,我看只有flush那块调用了isSSE() -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org