synchronized (connectionLock) {
try {
boolean currentConnection = ping();
if (connected != currentConnection) {
connected = currentConnection;
connectionPublisher.publishEvent(new NetworkEvent(AbstractTransferrer.this, connected));
return true;
}
} catch (Throwable e) {
logger.warn(e.getMessage(), e);
}