fix(quic): exclude locally rejected datagrams [CI]
This commit is contained in:
1 parent
f6e477fb10
commit
e82b165eb0
7 files changed
+131
-17
No files matched your search
@@ -138,6 +138,36 @@ public sealed class RowStore
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Remove a row that was reserved locally but never accepted by the transport.</summary>
|
||||
internal bool Remove(long key)
|
||||
{
|
||||
lock (_gate)
|
||||
{
|
||||
if (key < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
int slot = (int)(key % _capacity);
|
||||
if (_keys[slot] != key)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
_keys[slot] = -1;
|
||||
for (int i = 0; i < _columns.Count; i++)
|
||||
{
|
||||
_values[i][slot] = 0;
|
||||
if (_valid[i] is { } valid)
|
||||
{
|
||||
valid[slot] = false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>读一个值;行不存在或该列没有设置(可空列)返回 false。</summary>
|
||||
public bool TryGet(long key, int column, out long value)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user