if (connector != null && !immediateFail) {
connector.latch();
}
if (socket == null) {
final String msg = "Error writing to " + getName() + " socket not available";
throw new AppenderRuntimeException(msg);
}
}
synchronized (this) {
try {
getOutputStream().write(bytes, offset, length);
} catch (final IOException ex) {
if (retry && connector == null) {
connector = new Reconnector(this);
connector.setDaemon(true);
connector.setPriority(Thread.MIN_PRIORITY);
connector.start();
}
final String msg = "Error writing to " + getName();
throw new AppenderRuntimeException(msg, ex);
}
}
}