mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-01 07:46:47 +00:00
Send HTTP 408 on idle timeout
This commit is contained in:
1 parent
e04b5e5c9f
commit
d6ade0e1ac
1 file changed
+3
@@ -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