Skip to content

Commit

Permalink
format : update some codes style (#1533)
Browse files Browse the repository at this point in the history
* update some codes style

* update adaptor.go and client.go

* Update fasthttpproxy/http.go

Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com>

---------

Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com>
  • Loading branch information
sunhailin-Leo and erikdubbelboer committed Apr 4, 2023
1 parent 5f4899a commit 239cce4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1617,8 +1617,7 @@ func (c *HostClient) dialConnFor(w *wantConn) {
}

cc := acquireClientConn(conn)
delivered := w.tryDeliver(cc, nil)
if !delivered {
if !w.tryDeliver(cc, nil) {
// not delivered, return idle connection
c.releaseConn(cc)
}
Expand Down
2 changes: 1 addition & 1 deletion fasthttpproxy/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func FasthttpHTTPDialerTimeout(proxy string, timeout time.Duration) fasthttp.Dia
return nil, err
}

req := fmt.Sprintf("CONNECT %s HTTP/1.1\r\nHost: %s\r\n", addr, addr)
req := "CONNECT " + addr + " HTTP/1.1\r\nHost: " + addr + "\r\n"
if auth != "" {
req += "Proxy-Authorization: Basic " + auth + "\r\n"
}
Expand Down

0 comments on commit 239cce4

Please sign in to comment.