Skip to content

Commit 83c19d6

Browse files
committed
Removed legacy event listener from application initializer to address #225
1 parent 1ee3be6 commit 83c19d6

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

aws-serverless-java-container-spring/src/main/java/com/amazonaws/serverless/proxy/spring/LambdaSpringApplicationInitializer.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -142,18 +142,6 @@ public void onStartup(ServletContext servletContext) throws ServletException {
142142
DefaultDispatcherConfig dispatcherConfig = new DefaultDispatcherConfig(servletContext);
143143
applicationContext.setServletConfig(dispatcherConfig);
144144

145-
// Configure the listener for the request handled events. All we do here is release the latch
146-
applicationContext.addApplicationListener((ApplicationListener<ServletRequestHandledEvent>) servletRequestHandledEvent -> {
147-
try {
148-
if (currentResponse != null) {
149-
currentResponse.flushBuffer();
150-
}
151-
} catch (IOException e) {
152-
log.error("Could not flush response buffer", e);
153-
throw new RuntimeException("Could not flush response buffer", e);
154-
}
155-
});
156-
157145
// Manage the lifecycle of the root application context
158146
this.addListener(new ContextLoaderListener(applicationContext));
159147

0 commit comments

Comments
 (0)