Skip to content

Commit

Permalink
added nil check
Browse files Browse the repository at this point in the history
  • Loading branch information
myleshorton committed Nov 6, 2024
1 parent 7cfdd7c commit c7182ad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fronted.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,9 @@ func (f *fronted) doDial(m MasqueradeInterface) (conn net.Conn, retriable bool,

// Log the time it takes to dial
defer func(start time.Time) {
log.Debugf("Dialing to %v took %v", m, time.Since(start))
if conn != nil {
log.Debugf("Dialing to %v took %v", m, time.Since(start))
}
}(time.Now())
conn, err = m.dial(f.certPool, f.clientHelloID)
if err != nil {
Expand Down

0 comments on commit c7182ad

Please sign in to comment.