@@ -133,7 +133,6 @@ func (hp *holePuncher) directConnect(rp peer.ID) error {
133
133
for i := 1 ; i <= maxRetries ; i ++ {
134
134
addrs , obsAddrs , rtt , err := hp .initiateHolePunch (rp )
135
135
if err != nil {
136
- log .Debugw ("hole punching failed" , "peer" , rp , "error" , err )
137
136
hp .tracer .ProtocolError (rp , err )
138
137
return err
139
138
}
@@ -184,9 +183,8 @@ func (hp *holePuncher) initiateHolePunch(rp peer.ID) ([]ma.Multiaddr, []ma.Multi
184
183
185
184
addr , obsAddr , rtt , err := hp .initiateHolePunchImpl (str )
186
185
if err != nil {
187
- log .Debugf ("%s" , err )
188
186
str .Reset ()
189
- return addr , obsAddr , rtt , err
187
+ return addr , obsAddr , rtt , fmt . Errorf ( "failed to initiateHolePunch: %w" , err )
190
188
}
191
189
return addr , obsAddr , rtt , err
192
190
}
@@ -278,7 +276,10 @@ func (nn *netNotifiee) Connected(_ network.Network, conn network.Conn) {
278
276
return
279
277
}
280
278
281
- _ = hs .DirectConnect (conn .RemotePeer ())
279
+ err := hs .DirectConnect (conn .RemotePeer ())
280
+ if err != nil {
281
+ log .Debugf ("attempt to perform DirectConnect to %s failed: %s" , conn .RemotePeer (), err )
282
+ }
282
283
}()
283
284
}
284
285
}
0 commit comments