Skip to content

Commit

Permalink
More fix for #220 [runtime] Allow WebSocketProtocol to dispatch async…
Browse files Browse the repository at this point in the history
…hronously
  • Loading branch information
jfarcand committed Mar 12, 2012
1 parent ba7d4af commit 1971f81
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,10 @@ public WebSocketProcessor(AtmosphereFramework framework, WebSocket webSocket, We
s = framework.getAtmosphereConfig().getInitParameter(ApplicationConfig.WEBSOCKET_PROTOCOL_EXECUTION);
if (s != null && Boolean.valueOf(s)) {
executeAsync = true;
asyncExecutor = Executors.newCachedThreadPool();
} else {
executeAsync = false;
asyncExecutor = VoidExecutorService.VOID;
}
asyncExecutor = Executors.newCachedThreadPool();
}

public final void dispatch(final AtmosphereRequest request) throws IOException {
Expand Down Expand Up @@ -233,6 +232,7 @@ public void close(int closeCode) {
WebSocketAdapter.class.cast(webSocket).setAtmosphereResource(null);
}
}
asyncExecutor.shutdownNow();
}

@Override
Expand Down

0 comments on commit 1971f81

Please sign in to comment.