Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-582

Timer task throws exception on task submission if task has already been cancelled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.4.2, 2.5.1, 2.6
    • None
    • None

      When we submit a timer task to a timer, but - before the timer is scheduled - it is cancelled, then we get the exception below.
      SOLUTION: simply catch and eat the exception

      @FD_SOCK Ping thread 09:43:17,125 ERROR [jgroups] uncaught exception in Thread[FD_SOCK Ping thread,5,JGroups threads] (thread group=org.jgroups.util.Util$1[name=JGroups threads,maxpri=10] )
      java.lang.IllegalStateException: Timer already cancelled.
      at java.util.Timer.sched(Timer.java:354)
      at java.util.Timer.schedule(Timer.java:170)
      at org.jgroups.util.TimeScheduler.schedule(TimeScheduler.java:125)
      at org.jgroups.util.TimeScheduler.add(TimeScheduler.java:112)
      at org.jgroups.protocols.FD_SOCK$BroadcastTask.addSuspectedMember(FD_SOCK.java:1186)
      at org.jgroups.protocols.FD_SOCK.broadcastSuspectMessage(FD_SOCK.java:721)
      at org.jgroups.protocols.FD_SOCK.run(FD_SOCK.java:453)
      at java.lang.Thread.run(Thread.java:595)

              rhn-engineering-bban Bela Ban
              rhn-engineering-bban Bela Ban
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: