From 6ead52ae2e9455655f0788f1d25a31e659637c1a Mon Sep 17 00:00:00 2001 From: Andreas Holmberg Date: Tue, 3 Sep 2019 09:48:03 +0200 Subject: [PATCH 1/2] Changed so that SendAsync just waits for the repsonse header. Otherwise streaming subscriptions will hang for the entire subscription time and only continue executing when expired. --- Core/EwsHttpWebRequest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/EwsHttpWebRequest.cs b/Core/EwsHttpWebRequest.cs index 65a9c7b1..23827187 100644 --- a/Core/EwsHttpWebRequest.cs +++ b/Core/EwsHttpWebRequest.cs @@ -107,7 +107,7 @@ public async Task GetResponse(CancellationToken token) HttpResponseMessage response = null; try { - response = await _httpClient.SendAsync(message, token); + response = await _httpClient.SendAsync(message, HttpCompletionOption.ResponseHeadersRead., token); } catch(Exception exception) { From e6ddc3194aa63c2d32e0883e4edbb9c398d437ed Mon Sep 17 00:00:00 2001 From: Andreas Holmberg Date: Tue, 3 Sep 2019 12:23:33 +0200 Subject: [PATCH 2/2] When executing on Linux the list of timezonetransitions is significantly larger and we get duplicate key exceptions when populating. Changing the key to be more specific and avoiding confilicts --- ComplexProperties/TimeZones/TimeZoneTransitionGroup.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ComplexProperties/TimeZones/TimeZoneTransitionGroup.cs b/ComplexProperties/TimeZones/TimeZoneTransitionGroup.cs index 57b88b76..3aa99306 100644 --- a/ComplexProperties/TimeZones/TimeZoneTransitionGroup.cs +++ b/ComplexProperties/TimeZones/TimeZoneTransitionGroup.cs @@ -127,7 +127,7 @@ internal virtual void InitializeFromAdjustmentRule(AdjustmentRule adjustmentRule standardPeriodToSet.Id = string.Format( "{0}/{1}", standardPeriod.Id, - adjustmentRule.DateStart.Year); + adjustmentRule.DateSTart.ToString("yyyyMMdd")); standardPeriodToSet.Name = standardPeriod.Name; standardPeriodToSet.Bias = standardPeriod.Bias; this.timeZoneDefinition.Periods.Add(standardPeriodToSet.Id, standardPeriodToSet); @@ -143,7 +143,7 @@ internal virtual void InitializeFromAdjustmentRule(AdjustmentRule adjustmentRule daylightPeriod.Id = string.Format( "{0}/{1}", TimeZonePeriod.DaylightPeriodId, - adjustmentRule.DateStart.Year); + adjustmentRule.DateSTart.ToString("yyyyMMdd")); daylightPeriod.Name = TimeZonePeriod.DaylightPeriodName; daylightPeriod.Bias = standardPeriod.Bias - adjustmentRule.DaylightDelta; @@ -158,7 +158,7 @@ internal virtual void InitializeFromAdjustmentRule(AdjustmentRule adjustmentRule standardPeriodToSet.Id = string.Format( "{0}/{1}", standardPeriod.Id, - adjustmentRule.DateStart.Year); + adjustmentRule.DateSTart.ToString("yyyyMMdd")); standardPeriodToSet.Name = standardPeriod.Name; standardPeriodToSet.Bias = standardPeriod.Bias; this.timeZoneDefinition.Periods.Add(standardPeriodToSet.Id, standardPeriodToSet);