Skip to content
This repository was archived by the owner on Oct 12, 2023. It is now read-only.

Commit 958752c

Browse files
nemakamvinaysurya
authored andcommitted
Making "session id received is null" transient exception (#218)
Making "session id received is null" transient exception (#218)
1 parent 1479fa3 commit 958752c

File tree

4 files changed

+23
-5
lines changed

4 files changed

+23
-5
lines changed

src/Microsoft.Azure.ServiceBus/Core/MessageReceiver.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -690,12 +690,16 @@ internal async Task GetSessionReceiverLinkAsync(TimeSpan serverWaitTime)
690690
if (!source.FilterSet.TryGetValue(AmqpClientConstants.SessionFilterName, out tempSessionId))
691691
{
692692
receivingAmqpLink.Session.SafeClose();
693-
throw new ServiceBusException(false, Resources.AmqpFieldSessionId);
693+
throw new ServiceBusException(true, Resources.SessionFilterMissing);
694694
}
695-
if (!string.IsNullOrWhiteSpace(tempSessionId))
695+
696+
if (string.IsNullOrWhiteSpace(tempSessionId))
696697
{
697-
this.SessionIdInternal = tempSessionId;
698+
receivingAmqpLink.Session.SafeClose();
699+
throw new ServiceBusException(true, Resources.AmqpFieldSessionId);
698700
}
701+
702+
this.SessionIdInternal = tempSessionId;
699703
long lockedUntilUtcTicks;
700704
this.LockedUntilUtcInternal = receivingAmqpLink.Settings.Properties.TryGetValue(AmqpClientConstants.LockedUntilUtc, out lockedUntilUtcTicks) ? new DateTime(lockedUntilUtcTicks, DateTimeKind.Utc) : DateTime.MinValue;
701705
}

src/Microsoft.Azure.ServiceBus/Microsoft.Azure.ServiceBus.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<Description>This is the next generation Azure Service Bus .NET Standard client library that focuses on queues &amp; topics. For more information about Service Bus, see https://azure.microsoft.com/en-us/services/service-bus/</Description>
55
<AssemblyTitle>Microsoft.Azure.ServiceBus</AssemblyTitle>
6-
<VersionPrefix>0.0.6-preview</VersionPrefix>
6+
<VersionPrefix>0.0.7-preview</VersionPrefix>
77
<Authors>Microsoft</Authors>
88
<TargetFrameworks>net451;netstandard1.3;uap10.0</TargetFrameworks>
99
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

src/Microsoft.Azure.ServiceBus/Resources.Designer.cs

Lines changed: 12 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Microsoft.Azure.ServiceBus/Resources.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,4 +210,7 @@
210210
<data name="PluginAlreadyRegistered" xml:space="preserve">
211211
<value>The {0} plugin has already been registered.</value>
212212
</data>
213+
<data name="SessionFilterMissing" xml:space="preserve">
214+
<value>Session filter is missing on the link. </value>
215+
</data>
213216
</root>

0 commit comments

Comments
 (0)