       @connected = false
       @connecting = false
       for i of @currentJobs
-        if @currentJobs.hasOwnProperty(i)
+        if @currentJobs.hasOwnProperty i
           if @currentJobs[i]
             @currentJobs[i].abort()
-            @currentJobs[i].emit "error", new Error("Job failed")
+            @currentJobs[i].emit "error", new Error "Job failed"
           delete @currentJobs[i]
       for i of @currentWorkers
-        if @currentWorkers.hasOwnProperty(i)
-          @currentWorkers[i].finished = true  if @currentWorkers[i]
+        if @currentWorkers.hasOwnProperty i
+          @currentWorkers[i].finished = true if @currentWorkers[i]
           delete @currentWorkers[i]
       @init()
 


  receive_JOB_ASSIGN: (handle, name, payload) ->
    if typeof @workers[name] is "function"
      worker = new Worker(this, handle, name, payload)
      @currentWorkers[handle] = worker
      @workers[name] payload, worker


    SUBMIT_JOB_SCHED: 35
    SUBMIT_JOB_EPOCH: 36

  @packetTypesReversed:
    1: "CAN_DO"
    2: "CANT_DO"
    3: "RESET_ABILITIES"
