Change log level to make it more clear how long it takes for creating

a network connection.
This commit is contained in:
chimp1984 2020-08-22 19:24:53 -05:00
parent 25b22e7a24
commit 6cd852631f
No known key found for this signature in database
GPG Key ID: 9801B4EC591F90E3

View File

@ -132,10 +132,8 @@ public abstract class NetworkNode implements MessageListener {
}
Socket socket = createSocket(peersNodeAddress);
long duration = System.currentTimeMillis() - startTs;
if (log.isDebugEnabled()) {
log.debug("Socket creation to peersNodeAddress {} took {} ms", peersNodeAddress.getFullAddress(),
duration);
}
log.info("Socket creation to peersNodeAddress {} took {} ms", peersNodeAddress.getFullAddress(),
duration);
if (duration > CREATE_SOCKET_TIMEOUT)
throw new TimeoutException("A timeout occurred when creating a socket.");