     for id, process of @processes
       process.component.shutdown()
     @started = false
+    setTimeout =>
+      return if @hasStopped
+      @emit 'end',
+        start: @startupDate
+        end: new Date
+        uptime: @uptime()
+      @hasStarted = false
+      @hasStopped = true
+    , 50
 
   getDebug: () ->
     @debug

      @sendInitials (err) =>
        return callback err if err
        @started = true
        @sendDefaults callback

  stop: ->
    # Disconnect all connections

  # Emit a 'start' event on the first connection, and 'end' event when
  # last connection has been closed
  connectionCount: 0
  hasStarted: false
  hasStopped: true
  increaseConnections: ->
    if @connectionCount is 0
      # First connection opened, execution has now started
      return if @hasStarted
      @emit 'start',
        start: @startupDate
      @hasStarted = true
      @hasStopped = false
    @connectionCount++
  decreaseConnections: ->
    @connectionCount--
