From 757a7fc1272b41a8adfe236d6f02170450f02633 Mon Sep 17 00:00:00 2001 From: Sebastian Burckhardt Date: Fri, 7 Jan 2022 07:56:46 -0800 Subject: [PATCH] fix bug in client connection establishment, introduced in #82, that caused slow startup --- .../TransportProviders/EventHubs/EventHubsTransport.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DurableTask.Netherite/TransportProviders/EventHubs/EventHubsTransport.cs b/src/DurableTask.Netherite/TransportProviders/EventHubs/EventHubsTransport.cs index 13fbf8de..729f1170 100644 --- a/src/DurableTask.Netherite/TransportProviders/EventHubs/EventHubsTransport.cs +++ b/src/DurableTask.Netherite/TransportProviders/EventHubs/EventHubsTransport.cs @@ -446,7 +446,7 @@ async Task ClientEstablishConnectionAsync(int index, PartitionReceiver receiver) this.traceHelper.LogDebug("Client{clientId}.ch{index} establishing connection", Client.GetShortId(this.ClientId), index); // receive a dummy packet to establish connection // (the packet, if any, cannot be for this receiver because it is fresh) - await receiver.ReceiveAsync(1); + await receiver.ReceiveAsync(1, TimeSpan.FromMilliseconds(1)); } catch (Exception exception) {