Skip to content

Views continue to update for disconnected clients #3860

Description

@Remixful

C# Module, versions 1.10.0 and 1.11.0

Within the view method I print Log.Debug(ctx.Sender.ToString()) and it ALSO prints out disconnected identities.

To get views to work with the (unofficial) Godot SDK I had to use a Table that has a primary key (type or record would not work due to how the local database was implemented).

Example:

    [SpacetimeDB.Table(Name ="DataTable")]
    public partial struct DataTable{ 
        [SpacetimeDB.PrimaryKey] 
        public Identity Identity; 
        public int TestInt;
    }

public static List<DataTable> MyDataTable(ViewContext ctx)
{
Log.Debug(ctx.Sender.ToString()); //Prints out different identities which have already been disconnected! (confirmed through ClientDisconnected)
  var rows = new List<DataTable>();
  rows.Add(new DataTable
  {
      Identity = ctx.Sender,
      TestInt = 100
  });
  return rows;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions