Skip to content

Commit

Permalink
fix duration parsing to us ofMillis
Browse files Browse the repository at this point in the history
  • Loading branch information
jclausen committed Apr 15, 2024
1 parent 7914aa2 commit 5f398f7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import ortus.boxlang.runtime.context.ScriptingRequestBoxContext;
import ortus.boxlang.runtime.dynamic.casters.BooleanCaster;
import ortus.boxlang.runtime.dynamic.casters.IntegerCaster;
import ortus.boxlang.runtime.dynamic.casters.LongCaster;
import ortus.boxlang.runtime.scopes.ApplicationScope;
import ortus.boxlang.runtime.scopes.Key;
import ortus.boxlang.runtime.services.CacheService;
Expand Down Expand Up @@ -173,7 +174,8 @@ public Session getSession( Key ID ) {
if ( sessionTimeout instanceof Duration ) {
timeoutDuration = ( Duration ) sessionTimeout;
} else {
timeoutDuration = Duration.ofMinutes( IntegerCaster.cast( startingListener.getSettings().get( Key.sessionTimeout ) ).longValue() );
timeoutDuration = Duration
.ofMillis( LongCaster.cast( IntegerCaster.cast( startingListener.getSettings().get( Key.sessionTimeout ) ).longValue() * 8.64e+7 ) );
}

Optional<Object> session = sessionsCache.getOrSet(
Expand Down

0 comments on commit 5f398f7

Please sign in to comment.