       return
 
     if @current.message is 'ping'
-      @worker.postMessage
-        message: 'ping'
-        data: @current.data
-      return
+      @ping()
+     return
 
     assert.equal @current.message, 'update'
 

      queue = @cryptoWorker.queue
      @cryptoWorker = new FallbackCryptoWorker @, @size, @onProgress, @chunkSize
      @cryptoWorker.addQueue queue
      @cryptoWorker.nextInQueue()

class BaseCryptoWorker
  constructor: (@instance, @size, @onProgress, @chunkSize) ->

    @worker.postMessage
      message: 'finalize'

  ping: =>
    @worker.postMessage
      message: 'ping'
      data: @current.data

  destroy: =>
    @worker.terminate()
    @instance._destroy()
