This is an automated email from the ASF dual-hosted git repository.
alexstocks pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-go-pixiu.git
The following commit(s) were added to refs/heads/develop by this push:
new 0ed72958 fix the stream not closed bug (#676)
0ed72958 is described below
commit 0ed72958792324bfa1b18d76d240149af39426ea
Author: Alan <[email protected]>
AuthorDate: Fri May 9 09:34:48 2025 +0800
fix the stream not closed bug (#676)
---
pkg/common/http/manager.go | 2 ++
1 file changed, 2 insertions(+)
diff --git a/pkg/common/http/manager.go b/pkg/common/http/manager.go
index cd37a6d4..703e4b1c 100644
--- a/pkg/common/http/manager.go
+++ b/pkg/common/http/manager.go
@@ -171,6 +171,7 @@ func (hcm *HttpConnectionManager) writeResponse(c
*pch.HttpContext) {
return
case data, ok := <-dataC:
if !ok {
+ _ = res.Stream.Close()
return
}
if _, err :=
c.Writer.Write(data); err != nil {
@@ -182,6 +183,7 @@ func (hcm *HttpConnectionManager) writeResponse(c
*pch.HttpContext) {
if err != nil && err != io.EOF {
logger.Errorf("Stream
error: %v", err)
}
+ _ = res.Stream.Close()
return
}
}