             project_id : @project_id
             state      : @_state
             time       : @_state_time
-        dbg("send message to each listener that state has been updated = #{misc.to_safe_str(mesg)}")
+        dbg("send message to each of the #{@_state_listeners.length} listeners that the state has been updated = #{misc.to_safe_str(mesg)}")
         for id, socket of @_state_listeners
             dbg("sending mesg to socket #{id}")
             socket.write_mesg('json', mesg)

    opts = defaults opts,
        project_id : required
        cb         : required
    v = project_cache_cb[opts.project_id]
    if v?
        v.push(opts.cb)

                    cb   : (err, s) =>
                        socket = s; cb(err)
            (cb) =>
                # record that this socket was used by the given project
                # (so on close can invalidate info)
                opts.project._socket_id = socket.id
                socket.write_mesg 'json', opts.mesg, (err) =>
                    if err
                        cb("error writing to socket -- #{err}")
