Don't log network stats if no messages have been received, as otherwise this floods the logs with empty stats due to failed connections.

This commit is contained in:
CalDescent 2022-08-21 12:14:12 +01:00
parent d8ca3a455d
commit a1365e57d8

View File

@ -841,7 +841,7 @@ public class Peer {
}
}
if (logStats) {
if (logStats && this.receivedMessageStats.size() > 0) {
StringBuilder statsBuilder = new StringBuilder(1024);
statsBuilder.append("peer ").append(this).append(" message stats:\n=received=");
appendMessageStats(statsBuilder, this.receivedMessageStats);