Skip to content

Commit

Permalink
check for success
Browse files Browse the repository at this point in the history
  • Loading branch information
kost committed Nov 30, 2022
1 parent a6ff65d commit 9e26196
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ func connectviaproxy(proxyaddr string, connectaddr string) net.Conn {
//disable socket read timeouts
conn.SetReadDeadline(time.Now().Add(100 * time.Hour))

if (strings.Contains(status, "HTTP/1.1 200 ")) ||
(strings.Contains(status, "HTTP/1.0 200 ")) {
if (resp.StatusCode == 200 || strings.Contains(status, "HTTP/1.1 200 ") ||
strings.Contains(status, "HTTP/1.0 200 ")) {
log.Print("Connected via proxy")
return conn
}
Expand Down

0 comments on commit 9e26196

Please sign in to comment.