Skip to content

Commit 720f842

Browse files
committed
fix http cache panic, fix ehang-io#626, fix ehang-io#509
1 parent 5224307 commit 720f842

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/proxy/http.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ reset:
177177
}
178178
}()
179179
for {
180-
if resp, err := http.ReadResponse(bufio.NewReader(connClient), r); err != nil || resp == nil {
180+
if resp, err := http.ReadResponse(bufio.NewReader(connClient), r); err != nil || resp == nil || r == nil {
181+
// if there got broken pipe, http.ReadResponse will get a nil
181182
return
182183
} else {
183184
//if the cache is start and the response is in the extension,store the response to the cache list

0 commit comments

Comments
 (0)