Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Libraries/Opc.Ua.Client/Session/Session.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2510,18 +2510,18 @@ public async Task ReconnectAsync(
/// <summary>
/// Recreate the subscriptions in a recreated session.
/// </summary>
/// <param name="transferSbscriptionTemplates">Uses Transfer service
/// <param name="transferSubscriptionTemplates">Uses Transfer service
/// if set to <c>true</c>.</param>
/// <param name="subscriptionsTemplate">The template for the subscriptions.</param>
/// <param name="ct">Cancellation token to cancel operation with</param>
private async Task RecreateSubscriptionsAsync(
bool transferSbscriptionTemplates,
bool transferSubscriptionTemplates,
IEnumerable<Subscription> subscriptionsTemplate,
CancellationToken ct)
{
using Activity? activity = m_telemetry.StartActivity();
bool transferred = false;
if (transferSbscriptionTemplates)
if (transferSubscriptionTemplates)
{
try
{
Expand Down Expand Up @@ -3533,7 +3533,8 @@ private void OnPublishComplete(
// raise an error event.
var error = new ServiceResult(e);

if (error.Code != StatusCodes.BadNoSubscription)
// raise publish error even for BadNoSubscription if there are active subscriptions.
if (error.Code != StatusCodes.BadNoSubscription || m_subscriptions.Any(s => s.Created))
{
PublishErrorEventHandler? callback = m_PublishError;

Expand Down