summaryrefslogtreecommitdiff
path: root/sources/core/VSTask.java
diff options
context:
space:
mode:
Diffstat (limited to 'sources/core/VSTask.java')
-rw-r--r--sources/core/VSTask.java19
1 files changed, 17 insertions, 2 deletions
diff --git a/sources/core/VSTask.java b/sources/core/VSTask.java
index 2687ec3..d92ca79 100644
--- a/sources/core/VSTask.java
+++ b/sources/core/VSTask.java
@@ -123,9 +123,23 @@ public class VSTask implements Comparable {
else if (taskTime > task.getTaskTime())
return 1;
+ /* If it's a ProtocolRecover, it should get handled very first */
+ boolean a = event instanceof ProcessRecoverEvent;
+ boolean b = task.getEvent() instanceof ProcessRecoverEvent;
+
+ if (a && b)
+ return 0;
+
+ if (a)
+ return -1;
+
+ if (b)
+ return 1;
+
+
/* If it's a ProtocolEvent, it should get handled first */
- boolean a = event instanceof ProtocolEvent;
- boolean b = task.getEvent() instanceof ProtocolEvent;
+ a = event instanceof ProtocolEvent;
+ b = task.getEvent() instanceof ProtocolEvent;
if (a && b)
return 0;
@@ -135,6 +149,7 @@ public class VSTask implements Comparable {
if (b)
return 1;
+
}
return 0;