* {@inheritDoc}
*/
public void run() {
try {
LoggerContext lc = (LoggerContext) getContext();
SocketConnector connector = createConnector(address, port, 0,
reconnectionDelay);
while (!Thread.currentThread().isInterrupted()) {
try {
getContext().getExecutorService().execute(connector);
} catch (RejectedExecutionException ex) {
// executor is shutting down...
continue;
}
socket = connector.awaitConnection();
dispatchEvents(lc);
connector = createConnector(address, port, reconnectionDelay);
}
} catch (InterruptedException ex) {
assert true; // ok... we'll exit now