Making "session id received is null" transient exception (#218)

Making "session id received is null" transient exception (#218)
This commit is contained in:
Neeraj Makam 2017-07-13 12:42:20 -07:00 коммит произвёл vinaysurya
Родитель 1479fa3c69
Коммит 958752cd26
4 изменённых файлов: 23 добавлений и 5 удалений

Просмотреть файл

@ -690,12 +690,16 @@ namespace Microsoft.Azure.ServiceBus.Core
if (!source.FilterSet.TryGetValue(AmqpClientConstants.SessionFilterName, out tempSessionId))
{
receivingAmqpLink.Session.SafeClose();
throw new ServiceBusException(false, Resources.AmqpFieldSessionId);
throw new ServiceBusException(true, Resources.SessionFilterMissing);
}
if (!string.IsNullOrWhiteSpace(tempSessionId))
if (string.IsNullOrWhiteSpace(tempSessionId))
{
this.SessionIdInternal = tempSessionId;
receivingAmqpLink.Session.SafeClose();
throw new ServiceBusException(true, Resources.AmqpFieldSessionId);
}
this.SessionIdInternal = tempSessionId;
long lockedUntilUtcTicks;
this.LockedUntilUtcInternal = receivingAmqpLink.Settings.Properties.TryGetValue(AmqpClientConstants.LockedUntilUtc, out lockedUntilUtcTicks) ? new DateTime(lockedUntilUtcTicks, DateTimeKind.Utc) : DateTime.MinValue;
}

Просмотреть файл

@ -3,7 +3,7 @@
<PropertyGroup>
<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>
<AssemblyTitle>Microsoft.Azure.ServiceBus</AssemblyTitle>
<VersionPrefix>0.0.6-preview</VersionPrefix>
<VersionPrefix>0.0.7-preview</VersionPrefix>
<Authors>Microsoft</Authors>
<TargetFrameworks>net451;netstandard1.3;uap10.0</TargetFrameworks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

13
src/Microsoft.Azure.ServiceBus/Resources.Designer.cs сгенерированный
Просмотреть файл

@ -265,7 +265,18 @@ namespace Microsoft.Azure.ServiceBus {
return ResourceManager.GetString("RuleFilterNotSupported", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Session filter is missing on the link.
/// </summary>
public static string SessionFilterMissing
{
get
{
return ResourceManager.GetString("SessionFilterMissing", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A session handler has already been registered..
/// </summary>

Просмотреть файл

@ -210,4 +210,7 @@
<data name="PluginAlreadyRegistered" xml:space="preserve">
<value>The {0} plugin has already been registered.</value>
</data>
<data name="SessionFilterMissing" xml:space="preserve">
<value>Session filter is missing on the link. </value>
</data>
</root>