Browse Source

心跳bug fix

lideyin 5 years ago
parent
commit
f0736af63d

+ 1 - 9
examcloud-core-oe-student-service/src/main/java/cn/com/qmth/examcloud/core/oe/student/service/impl/ExamControlServiceImpl.java

@@ -1379,20 +1379,12 @@ public class ExamControlServiceImpl implements ExamControlService {
                 ExamingActivityTime.class);
         if (null == examingActiveTime) {
             examingActiveTime = new ExamingActivityTime();
-            examingActiveTime.setActiveTime(System.currentTimeMillis());
             examingActiveTime.setExamRecordDataId(examSessionInfo.getExamRecordDataId());
         }
+        examingActiveTime.setActiveTime(System.currentTimeMillis());
 
         redisClient.set(examingActiveTimeKey, examingActiveTime);
 
-        long activeTime = examingActiveTime.getActiveTime();
-
-        long now = System.currentTimeMillis();
-        if (now - activeTime >= examSessionInfo.getExamReconnectTime().intValue() * 60 * 1000) {
-            delayHandInExamIfLocked(examSessionInfo.getExamRecordDataId());
-            return 0L;
-        }
-
         // 在线考生心跳打点
         ReportsUtil.report(new OnlineExamStudentReport(user.getRootOrgId(), user.getUserId(),
                 examSessionInfo.getExamId(), examSessionInfo.getExamStudentId()));