Browse Source

Completing files commit for upstreamproxy.Error type. Do more robust error check on the handshake return error now that ErrPersistEOF check moved into the handshake itself

Eugene Fryntov 10 years ago
parent
commit
9a89e727f0
1 changed files with 4 additions and 0 deletions
  1. 4 0
      psiphon/upstreamproxy/proxy_http.go

+ 4 - 0
psiphon/upstreamproxy/proxy_http.go

@@ -92,6 +92,10 @@ func (hp *httpProxy) Dial(network, addr string) (net.Conn, error) {
 handshakeLoop:
 	for {
 		err := pc.handshake(addr, hp.username, hp.password)
+		if err != nil {
+			//already wrapped in proxyError
+			return nil, err
+		}
 		switch pc.authState {
 		case HTTP_AUTH_STATE_SUCCESS:
 			pc.hijackedConn, pc.staleReader = pc.httpClientConn.Hijack()