Skip to content

Commit d2635df

Browse files
committed
cleanse old overgrown chains
1 parent 4456cc1 commit d2635df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libsignal-protocol-dotnet/state/SessionState.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public void addReceiverChain(ECPublicKey senderRatchetKey, ChainKey chainKey)
213213
};
214214
this.sessionStructure.ReceiverChains.Add(chain);
215215

216-
if (this.sessionStructure.ReceiverChains.Count > 5)
216+
while (this.sessionStructure.ReceiverChains.Count > 5)
217217
{
218218
this.sessionStructure.ReceiverChains.RemoveAt(0); //TODO why was here a TODO?
219219
}

0 commit comments

Comments
 (0)