Skip to content

Commit a830de1

Browse files
committed
fix
1 parent c557243 commit a830de1

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,10 @@ internal IEnumerable<ServiceEndpoint> GetRoutedEndpoints(ServiceMessage message)
233233
case ClientInvocationMessage clientInvocationMessage:
234234
return _router.GetEndpointsForConnection(clientInvocationMessage.ConnectionId, endpoints);
235235

236-
case ServiceMappingMessage serviceMappingMessage:
237-
return _router.GetEndpointsForBroadcast(endpoints);
238-
239236
case ServiceCompletionMessage serviceCompletionMessage:
240-
return _router.GetEndpointsForBroadcast(endpoints);
237+
return _router.GetEndpointsForConnection(serviceCompletionMessage.ConnectionId, endpoints);
238+
239+
// ServiceMappingMessage should never be sent to the service
241240

242241
default:
243242
throw new NotSupportedException(message.GetType().Name);

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,8 @@ public Task<T> AddInvocation<T>(string hub, string connectionId, string invocati
4343
cancellationToken,
4444
() => TryCompleteResult(connectionId, CompletionMessage.WithError(invocationId, "Canceled")));
4545

46-
var ackNumber = 1;
47-
if (_serviceEndpointManager != null && _endpointRouter != null) {
48-
var serviceEndpoints = _serviceEndpointManager.GetEndpoints(hub);
49-
ackNumber = _endpointRouter.GetEndpointsForConnection(connectionId, serviceEndpoints).Count();
50-
}
46+
var serviceEndpoints = _serviceEndpointManager.GetEndpoints(hub);
47+
var ackNumber = _endpointRouter.GetEndpointsForConnection(connectionId, serviceEndpoints).Count();
5148

5249
var multiAck = _ackHandler.CreateMultiAck(out var ackId);
5350

0 commit comments

Comments
 (0)