mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-19 22:58:08 +01:00
Send HTTP 408 on idle timeout
This commit is contained in:
@@ -21,7 +21,10 @@ public class IOExceptionMapper implements ExceptionMapper<IOException> {
|
||||
public Response toResponse(IOException e) {
|
||||
if (!(e.getCause() instanceof java.util.concurrent.TimeoutException)) {
|
||||
logger.warn("IOExceptionMapper", e);
|
||||
} else if (e.getCause().getMessage().startsWith("Idle timeout expired")) {
|
||||
return Response.status(Response.Status.REQUEST_TIMEOUT).build();
|
||||
}
|
||||
|
||||
return Response.status(503).build();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user