Here is a quick test that creates a record, sets it with an ack, then subscribes to changes, then sets with an ack again. Finally it waits for the property change event to trigger which never happens.
Note this is all on the one connection.
[Test]
public async Task SubscribeToChangesOnSameConnection()
{
var key = @"test/helloworld";
using (var writerClient = await GetConnection("john", "test"))
{
var obj = new JObject();
obj["name"] = "test me";
var record = await writerClient.Records.GetRecordAsync(key);
var set = await writerClient.Records.SetWithAckAsync(record, obj);
Assert.IsTrue(set);
var events = new List<PropertyChangedEventArgs>();
record.PropertyChanged += (sender, args) =>
{
events.Add(args);
};
obj["name"] = "bob";
set = await writerClient.Records.SetWithAckAsync(record, obj);
Assert.IsTrue(set);
// hangs here and never gets the event
while (events.Count == 0)
{
System.Threading.Thread.Sleep(200);
}
}
}
Here is a quick test that creates a record, sets it with an ack, then subscribes to changes, then sets with an ack again. Finally it waits for the property change event to trigger which never happens.
Note this is all on the one connection.