Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/22/12 16:35:32 (12 years ago)
Author:
jkarder
Message:

#1751: fixed event handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/RefreshableJob.cs

    r7782 r8090  
    519519    public event EventHandler HiveTasksChanged;
    520520    protected virtual void OnHiveTasksChanged() {
    521       if (jobResultPoller != null && jobResultPoller.IsPolling) {
    522         jobResultPoller.Stop();
    523         DeregisterResultPollingEvents();
    524       }
     521      StopResultPolling();
    525522      if (this.HiveTasks != null && this.HiveTasks.Count > 0 && this.GetAllHiveTasks().All(x => x.Task.Id != Guid.Empty)) {
    526523        if (IsFinished()) {
    527524          this.ExecutionState = Core.ExecutionState.Stopped;
    528525          this.RefreshAutomatically = false;
    529         }
    530 
    531         if (this.RefreshAutomatically) {
    532           StartResultPolling();
     526          if (jobResultPoller != null) DeregisterResultPollingEvents();
     527        } else {
     528          this.RefreshAutomatically = true;
    533529        }
    534530      }
Note: See TracChangeset for help on using the changeset viewer.