Skip to content

Commit

Permalink
Improve error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
imdawon committed Jul 2, 2024
1 parent 6f0b40b commit fbdaf93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,11 @@ func setUpLocalSeviceProxies(protectedServiceString string, localServiceProxies

func establishConnection(dialer net.Dialer, drawbridgeAddress string, tlsConfig *tls.Config) (net.Conn, error) {
conn, err := tls.DialWithDialer(&net.Dialer{Timeout: 15 * time.Second}, "tcp", drawbridgeAddress, tlsConfig)
if err == nil {
if err != nil {
slog.Error("Failed connecting to Drawbridge mTLS TCP server", err)
return conn, nil
return nil, err
}
return nil, err
return conn, nil

}

Expand Down

0 comments on commit fbdaf93

Please sign in to comment.