ScheduledService doesn't stop after calling cancel

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 8
    • Affects Version/s: 8
    • Component/s: javafx
    • None

      Calling cancel from within an event handler ends up being completely ignored by the ScheduledService, because after the event handlers do their business, it then schedules up the next request. We need to remember when somebody has cancelled, so that on the next iteration we can just stop.

              GetNetworkInterfacesService networkInterfacesService = new GetNetworkInterfacesService();
              networkInterfacesService.setPeriod(Duration.seconds(1));
              networkInterfacesService.setOnSucceeded(event -> {
                  networkInterfacesService.cancel();
              });
              networkInterfacesService.start();

            Assignee:
            Richard Bair (Inactive)
            Reporter:
            Richard Bair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: