Skip to content

Commit

Permalink
enh: remove workaround for jetty/jetty.project#8556
Browse files Browse the repository at this point in the history
  • Loading branch information
lprimak committed Dec 20, 2023
1 parent cf2f1f0 commit de4dfde
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ static int getCookieAge(ServletRequest request, org.apache.shiro.mgt.SecurityMan
} else {
try {
return (int) Duration.ofMinutes(request.getServletContext().getSessionTimeout()).toSeconds();
} catch (Throwable e) {
// workaround for https://github.com/eclipse/jetty.project/issues/8556
} catch (NoSuchMethodError noSuchMethodError) {
// Older servers (e.g. Jetty 9.x) do not support getSessionTimeout() at all
log.debug("ServletContext.getSessionTimeout() not supported", noSuchMethodError);
return (int) Duration.ofHours(1).toSeconds();
}
}
Expand Down

0 comments on commit de4dfde

Please sign in to comment.