From afafb6725f2b6d03494445fb6440e7efdc8ab0f2 Mon Sep 17 00:00:00 2001 From: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com> Date: Thu, 7 Nov 2024 18:40:24 +0000 Subject: [PATCH] Fixed autocad async --- .../Bindings/AutocadSendBaseBinding.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Connectors/Autocad/Speckle.Connectors.AutocadShared/Bindings/AutocadSendBaseBinding.cs b/Connectors/Autocad/Speckle.Connectors.AutocadShared/Bindings/AutocadSendBaseBinding.cs index dda2cca8e..b197b119c 100644 --- a/Connectors/Autocad/Speckle.Connectors.AutocadShared/Bindings/AutocadSendBaseBinding.cs +++ b/Connectors/Autocad/Speckle.Connectors.AutocadShared/Bindings/AutocadSendBaseBinding.cs @@ -111,10 +111,13 @@ private void OnObjectChanged(DBObject dbObject) private void OnChangeChangedObjectIds(DBObject dBObject) { ChangedObjectIds[dBObject.GetSpeckleApplicationId()] = 1; - _idleManager.SubscribeToIdle(nameof(AutocadSendBinding), RunExpirationChecks); + _idleManager.SubscribeToIdle( + nameof(AutocadSendBinding), + async () => await RunExpirationChecks().ConfigureAwait(false) + ); } - private void RunExpirationChecks() + private async Task RunExpirationChecks() { var senders = _store.GetSenders(); string[] objectIdsList = ChangedObjectIds.Keys.ToArray(); @@ -132,7 +135,7 @@ private void RunExpirationChecks() } } - Commands.SetModelsExpired(expiredSenderIds); + await Commands.SetModelsExpired(expiredSenderIds).ConfigureAwait(false); ChangedObjectIds = new(); }