Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9390


Ignore:
Timestamp:
04/22/13 17:24:17 (11 years ago)
Author:
ascheibe
Message:

#1890 fixed a bug in RefreshAutomatically where the event for receiving the results was deregistered to early

File:
1 edited

Legend:

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

    r9219 r9390  
    110110            }
    111111          } else {
    112             StopResultPolling();
     112            PauseResultPolling();
    113113          }
    114114        }
     
    239239    public void StopResultPolling() {
    240240      if (jobResultPoller != null && jobResultPoller.IsPolling) {
     241        refreshAutomatically = false;
    241242        jobResultPoller.Stop();
    242243        DeregisterResultPollingEvents();
     244        jobResultPoller = null;
     245      }
     246    }
     247
     248    public void PauseResultPolling() {
     249      if (jobResultPoller != null && jobResultPoller.IsPolling) {
     250        jobResultPoller.Stop();
    243251      }
    244252    }
     
    515523    public event EventHandler HiveTasksChanged;
    516524    protected virtual void OnHiveTasksChanged() {
    517       StopResultPolling();
    518525      if (this.HiveTasks != null && this.HiveTasks.Count > 0 && this.GetAllHiveTasks().All(x => x.Task.Id != Guid.Empty)) {
    519526        if (IsFinished()) {
    520527          this.ExecutionState = Core.ExecutionState.Stopped;
    521528          this.RefreshAutomatically = false;
    522           if (jobResultPoller != null) DeregisterResultPollingEvents();
     529          StopResultPolling();
    523530        } else {
    524531          this.RefreshAutomatically = true;
Note: See TracChangeset for help on using the changeset viewer.