                         dbg("got new state -- #{@_state}")
                         @_update_state_db()
                         @_update_state_listeners()
-                    cb?()
+                v = @_update_state_cbs
+                delete @_update_state_cbs
+                for cb in v
+                    cb?(err)
 
     state: (opts) =>
         opts = defaults opts,


    _update_state: (state_error, cb) =>
        dbg = @dbg("_update_state")
        dbg("state likely changed -- determined what it changed to")
        before = @_state
        @_command
            action : 'status'
            cb     : (err, r) =>
                if err
                    dbg("error getting status -- #{err}")
                    cb?(err)
                else
                    if r['state'] != before
                        @_state = r['state']

    opening:
        desc     : 'The project is being opened, so all files and snapshots are being downloaded, the user is being created, etc.'
        to       : {}
        timeout  : 30*60
        commands : ['status', 'mintime']

    starting:
