Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/10/08 14:15:00 (15 years ago)
Author:
msteinbi
Message:

Implementing ClientCommunicator (#399)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Server.Core/ClientCommunicator.cs

    r934 r940  
    7070      ResponseJob response = new ResponseJob();
    7171      lock (this) {
    72         response.JobId = jobs.Last.Value;
    73         jobs.RemoveLast();
    74         response.SerializedJob = PersistenceManager.SaveToGZip(new TestJob());
     72        if (jobs.Last != null) {
     73          response.JobId = jobs.Last.Value;
     74          jobs.RemoveLast();
     75          response.SerializedJob = PersistenceManager.SaveToGZip(new TestJob());
     76          response.Success = true;
     77          response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_PULLED;
     78          return response;
     79        }
    7580      }
    76      
    7781      response.Success = true;
    78       response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_PULLED;
    79       return response;
     82      response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_NO_JOBS_LEFT;
    8083    }
    8184
Note: See TracChangeset for help on using the changeset viewer.