Skip to content

Commit

Permalink
Print user agent to debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
styppo committed Dec 4, 2018
1 parent cc39089 commit 8680aa6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/generic/network/connection/ConnectionPool.js
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ class ConnectionPool extends Observable {
// Let listeners know that the peers changed.
this.fire('peers-changed');

Log.d(ConnectionPool, () => `[PEER-JOINED] ${peer.peerAddress} ${peer.netAddress} (version=${peer.version}, services=${peer.peerAddress.services}, headHash=${peer.headHash.toBase64()})`);
Log.d(ConnectionPool, () => `[PEER-JOINED] ${peer.peerAddress} ${peer.netAddress} (version=${peer.version}, services=${peer.peerAddress.services}, userAgent=${peer.userAgent || '<unknown>'}, headHash=${peer.headHash.toBase64()})`);
}

/**
Expand Down Expand Up @@ -652,7 +652,7 @@ class ConnectionPool extends Observable {
const kbTransferred = ((peerConnection.networkConnection.bytesSent
+ peerConnection.networkConnection.bytesReceived) / 1000).toFixed(2);
Log.d(ConnectionPool, () => `[PEER-LEFT] ${peerConnection.peerAddress} ${peerConnection.peer.netAddress} `
+ `(version=${peerConnection.peer.version}, transferred=${kbTransferred} kB, closeType=${type} ${reason})`);
+ `(transferred=${kbTransferred} kB, closeType=${type} ${reason})`);
} else {
if (peerConnection.networkConnection.inbound) {
this._inboundCount--;
Expand Down

0 comments on commit 8680aa6

Please sign in to comment.