Skip to content

Commit

Permalink
exit SocketConnectorBase.run when executor rejects a task
Browse files Browse the repository at this point in the history
Previously, exited only on interrupt, but if the executor is shutting
down, there's no reason for us to wait to be interrupted.
  • Loading branch information
ceharris committed May 1, 2013
1 parent a3b532b commit 42a929e
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -177,8 +177,7 @@ public final void run() {
try {
getContext().getExecutorService().execute(connector);
} catch (RejectedExecutionException ex) {
// executor is shutting down...
continue;
break; // executor is shutting down...
}
socket = connector.awaitConnection();
dispatchEvents();
Expand Down

0 comments on commit 42a929e

Please sign in to comment.