Skip to content

Commit

Permalink
fix http cache panic, fix #626, fix #509
Browse files Browse the repository at this point in the history
  • Loading branch information
ffdfgdfg committed Oct 5, 2020
1 parent 5224307 commit 720f842
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/proxy/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ reset:
}
}()
for {
if resp, err := http.ReadResponse(bufio.NewReader(connClient), r); err != nil || resp == nil {
if resp, err := http.ReadResponse(bufio.NewReader(connClient), r); err != nil || resp == nil || r == nil {
// if there got broken pipe, http.ReadResponse will get a nil
return
} else {
//if the cache is start and the response is in the extension,store the response to the cache list
Expand Down

0 comments on commit 720f842

Please # to comment.