@@ -51,8 +51,6 @@ public class JMSSession extends BaseSession {
5151 private final long expireTime ;
5252
5353
54- private LocalDateTime lastActiveTime ;
55-
5654 private LocalDateTime maxSessionEndTime ;
5755 private int maxSessionEndHours ;
5856 private LocalDateTime dynamicEndTime ;
@@ -205,7 +203,7 @@ private void recordLifecycle(ServiceOuterClass.SessionLifecycleLogRequest.EventT
205203 }
206204
207205 private void startWaitIdleTime () {
208- this .lastActiveTime = LocalDateTime . now ();
206+ this .refreshLastActiveTime ();
209207
210208 var token = SessionManager .getContextToken ();
211209
@@ -224,7 +222,7 @@ private void startWaitIdleTime() {
224222 return ;
225223 }
226224
227- if (Math .abs (Duration .between (LocalDateTime .now (), this .lastActiveTime ).toMinutes ()) > this .maxIdleTimeDelta ) {
225+ if (Math .abs (Duration .between (LocalDateTime .now (), this .getLastActiveTime () ).toMinutes ()) > this .maxIdleTimeDelta ) {
228226 this .close ("OverMaxIdleTimeError" , "idle_disconnect" , this .maxIdleTimeDelta );
229227 return ;
230228 }
@@ -310,7 +308,7 @@ private void closeGateway() {
310308 @ Override
311309 public SQLQueryResult withAudit (String command , QueryAuditFunction queryAuditFunction ) throws SQLException , CommandRejectException {
312310 synchronized (this ) {
313- this .lastActiveTime = LocalDateTime . now ();
311+ this .refreshLastActiveTime ();
314312 }
315313 if (this .locked ) {
316314 throw new CommandRejectException (MessageUtils .get ("SessionLockedError" ));
0 commit comments