Free cookie consent management tool by TermsFeed Policy Generator

Changeset 253 for trunk/sources


Ignore:
Timestamp:
05/14/08 00:21:20 (16 years ago)
Author:
gkronber
Message:

improved handling of closed or faulted connections in job-manager for distributed engine (ticket #149)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.DistributedEngine/JobManager.cs

    r249 r253  
    7070      do {
    7171        lock(connectionLock) {
    72           if(factory.State != CommunicationState.Opened)
    73             ResetConnection();
    7472          try {
    7573            currentEngineGuid = server.BeginExecuteEngine(zippedEngine);
     
    8381            }
    8482          } catch(CommunicationException communicationException) {
     83            ResetConnection();
    8584            // wait some time and try again (limit with maximal retries if retry count reached throw exception -> engine can decide to stop execution)
    8685            if(retryCount < MAX_CONNECTION_RETRIES) {
     
    120119          int retries = 0;
    121120          do {
    122             if(factory.State != CommunicationState.Opened) ResetConnection();
    123121            try {
    124122              zippedResult = server.TryEndExecuteEngine(engineGuid, 100);
     
    129127              Thread.Sleep(TimeSpan.FromSeconds(RETRY_TIMEOUT_SEC));
    130128            } catch(CommunicationException communicationException) {
     129              ResetConnection();
    131130              success = false;
    132131              retries++;
     
    156155            try {
    157156              lock(connectionLock) {
    158                 if(factory.State != CommunicationState.Opened) ResetConnection();
    159157                jobState = server.JobState(engineGuid);
    160158              }
     
    165163              Thread.Sleep(TimeSpan.FromSeconds(RETRY_TIMEOUT_SEC));
    166164            } catch(CommunicationException communicationException) {
     165              ResetConnection();
    167166              retries++;
    168167              success = false;
     
    181180              try {
    182181                lock(connectionLock) {
    183                   if(factory.State != CommunicationState.Opened) ResetConnection();
    184182                  server.BeginExecuteEngine(packedEngine);
    185183                }
     
    190188                Thread.Sleep(TimeSpan.FromSeconds(RETRY_TIMEOUT_SEC));
    191189              } catch(CommunicationException communicationException) {
     190                ResetConnection();
    192191                success = false;
    193192                retries++;
Note: See TracChangeset for help on using the changeset viewer.