Skip to content

Commit 18b868e

Browse files
authored
Fix OperationCount calculation (#3095)
Parenthesize `??` as `+` binds stronger
1 parent 1b56c7d commit 18b868e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/StackExchange.Redis/ServerEndPoint.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ internal Exception? LastException
180180
internal State InteractiveConnectionState => interactive?.ConnectionState ?? State.Disconnected;
181181
internal State SubscriptionConnectionState => KnowOrAssumeResp3() ? InteractiveConnectionState : subscription?.ConnectionState ?? State.Disconnected;
182182

183-
public long OperationCount => interactive?.OperationCount ?? 0 + subscription?.OperationCount ?? 0;
183+
public long OperationCount => (interactive?.OperationCount ?? 0) + (subscription?.OperationCount ?? 0);
184184

185185
public bool RequiresReadMode => serverType == ServerType.Cluster && IsReplica;
186186

0 commit comments

Comments
 (0)