Skip to content

Commit 68b7aa7

Browse files
committed
resolve comments and fix encoding issue
1 parent 9431689 commit 68b7aa7

File tree

7 files changed

+8
-9
lines changed

7 files changed

+8
-9
lines changed

src/Microsoft.Azure.SignalR.Common/ClientInvocation/ICallerClientResultsManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft. All rights reserved.
1+
// Copyright (c) Microsoft. All rights reserved.
22
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33

44
using System.Threading;

src/Microsoft.Azure.SignalR.Common/ServiceConnections/ServiceConnectionContainerFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft. All rights reserved.
1+
// Copyright (c) Microsoft. All rights reserved.
22
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33

44
using System;

src/Microsoft.Azure.SignalR.Management/HubInstanceFactories/MultiEndpointConnectionContainerFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft. All rights reserved.
1+
// Copyright (c) Microsoft. All rights reserved.
22
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33

44
using Microsoft.Azure.SignalR.Common;

src/Microsoft.Azure.SignalR.Management/ServiceHubContextImpl.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft. All rights reserved.
1+
// Copyright (c) Microsoft. All rights reserved.
22
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33

44
using System;

src/Microsoft.Azure.SignalR/ClientInvocation/CallerClientResultsManager.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft. All rights reserved.
1+
// Copyright (c) Microsoft. All rights reserved.
22
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33
#if NET7_0_OR_GREATER
44
using System;
@@ -48,8 +48,6 @@ public Task<T> AddInvocation<T>(string hub, string connectionId, string invocati
4848

4949
var multiAck = _ackHandler.CreateMultiAck(out var ackId);
5050

51-
_ackHandler.SetExpectedCount(ackId, ackNumber);
52-
5351
// When the caller server is also the client router, Azure SignalR service won't send a ServiceMappingMessage to server.
5452
// To handle this condition, CallerClientResultsManager itself should record this mapping information rather than waiting for a ServiceMappingMessage sent by service. Only in this condition, this method is called with instanceId != null.
5553
var result = _pendingInvocations.TryAdd(invocationId,

src/Microsoft.Azure.SignalR/HubHost/ServiceHubDispatcher.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft. All rights reserved.
1+
// Copyright (c) Microsoft. All rights reserved.
22
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33

44
using System;

src/Microsoft.Azure.SignalR/HubHost/ServiceLifetimeManager.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,9 @@ public override async Task<T> InvokeConnectionAsync<T>(string connectionId, stri
129129

130130
var invocationId = _clientInvocationManager.Caller.GenerateInvocationId(connectionId);
131131
var message = AppendMessageTracingId(new ClientInvocationMessage(invocationId, connectionId, _callerId, SerializeAllProtocols(methodName, args, invocationId)));
132-
await WriteAsync(message);
132+
// The ack number of invocation will be set inside `WriteAsync`. So adding invocation should be first.
133133
var task = _clientInvocationManager.Caller.AddInvocation<T>(_hub, connectionId, invocationId, cancellationToken);
134+
await WriteAsync(message);
134135

135136
// Exception handling follows https://source.dot.net/#Microsoft.AspNetCore.SignalR.Core/DefaultHubLifetimeManager.cs,349
136137
try

0 commit comments

Comments
 (0)