                         testClient.end()
                     testClient.on 'end', () =>
                         # ready to run
-                        @state = @states.running
-                        readyCallback()
-                        for c in @readyCallbacks
-                            c()
-                        @readyCallbacks = []
+                        @state 'running'
                     testClient.on 'error', (e) ->
                         if e.code in ['ECONNREFUSED']
                             setTimeout tester, 1000

                    process.kill(child.PID)
                @process.kill()

module.exports =
    ServiceManager: ServiceManager
    Service: Service

                console.log "#{@name}: stopped, code #{code}, signal #{signal}"
                @port = null
                @process = null
                @state 'stopped'

            # wait until it starts responding to TCP connections before connecting
            tester = =>
