Skip to content

Commit

Permalink
http connection
Browse files Browse the repository at this point in the history
  • Loading branch information
刘河 committed Apr 11, 2019
1 parent 60c8b0c commit 3cb104c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion server/proxy/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ func (s *httpServer) httpHandle(c *conn.Conn, r *http.Request) {
defer connClient.Close()
defer c.Close()
for {
r := <-reqCh
if resp, err := http.ReadResponse(bufio.NewReader(connClient), r); err != nil {
return
} else {
r := <-reqCh
//if the cache is start and the response is in the extension,store the response to the cache list
if s.useCache && strings.Contains(r.URL.Path, ".") {
b, err := httputil.DumpResponse(resp, true)
Expand Down
1 change: 0 additions & 1 deletion server/proxy/p2p.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ func (s *P2PServer) p2pProcess(c *conn.Conn) {
logs.Trace("new p2p connection ,role %s , password %s, nat type %s ,local address %s", f, string(b), strconv.Itoa(int(natType)), c.RemoteAddr().String())
//存储
if f == common.WORK_P2P_VISITOR {
logs.Warn("try visitor")
v.visitorAddr = c.Conn.RemoteAddr().String()
v.visitorNatType = natType
v.visitor = c
Expand Down

0 comments on commit 3cb104c

Please sign in to comment.