Skip to content

Commit

Permalink
[O] Ignore errors on EOF
Browse files Browse the repository at this point in the history
  • Loading branch information
hykilpikonna committed Feb 10, 2024
1 parent a9625df commit c3402e8
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package icu.samnyan.aqua.sega.general.filter;

import icu.samnyan.aqua.sega.util.Compression;
import org.eclipse.jetty.io.EofException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
Expand Down Expand Up @@ -64,8 +65,11 @@ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse
response.setContentType("application/json; charset=utf-8");
response.addHeader("Content-Encoding", "deflate");

response.getOutputStream().write(respResult);

try {
response.getOutputStream().write(respResult);
} catch (EofException e) {
logger.warn("Client closed connection");
}
}

@Override
Expand Down

0 comments on commit c3402e8

Please sign in to comment.