Skip to content

Commit

Permalink
fix(libp2p): update circuit relay and upgrader logs (#2071)
Browse files Browse the repository at this point in the history
Co-authored-by: Chad Nehemiah <[email protected]>
  • Loading branch information
achingbrain and maschad authored Sep 26, 2023
1 parent 5ab1770 commit f09ac4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/libp2p/src/circuit-relay/transport/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ class CircuitRelayTransport implements Transport {
disconnectOnFailure
})
} catch (err: any) {
log.error(`Circuit relay dial to destination ${destinationPeer.toString()} via relay ${relayPeer.toString()} failed`, err)
log.error('circuit relay dial to destination %p via relay %p failed', destinationPeer, relayPeer, err)

if (stream != null) {
stream.abort(err)
Expand Down
2 changes: 1 addition & 1 deletion packages/libp2p/src/upgrader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ export class DefaultUpgrader implements Upgrader {

return muxedStream
} catch (err: any) {
log.error('could not create new stream', err)
log.error('could not create new stream for protocols %s on connection with address %a', protocols, connection.remoteAddr, err)

if (muxedStream.timeline.close == null) {
muxedStream.abort(err)
Expand Down

0 comments on commit f09ac4a

Please sign in to comment.