perf(tests): isolate network E2E and await QUIC cleanup
This commit is contained in:
1 parent
047df83a84
commit
0d08e90dab
20 files changed
+231
-181
No files matched your search
@@ -10,7 +10,7 @@ namespace MoShiro.Measurement;
|
||||
/// open one QUIC connection from a newly selected ephemeral source port. Measurement frames are sent
|
||||
/// only with MsQuic DATAGRAM calls; the existing TLS peer connection continues to carry session control.
|
||||
/// </summary>
|
||||
public sealed class QuicDatagramTransport : IDisposable
|
||||
public sealed class QuicDatagramTransport : IDisposable, IAsyncDisposable
|
||||
{
|
||||
private readonly MeasurementDatagramRouter _router;
|
||||
private readonly INodeLog _log;
|
||||
@@ -166,6 +166,16 @@ public sealed class QuicDatagramTransport : IDisposable
|
||||
_ = DisposeNativeResourcesAsync();
|
||||
}
|
||||
|
||||
public async ValueTask DisposeAsync()
|
||||
{
|
||||
if (Interlocked.Exchange(ref _disposed, 1) != 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
await DisposeNativeResourcesAsync().ConfigureAwait(false);
|
||||
}
|
||||
|
||||
private async Task DisposeNativeResourcesAsync()
|
||||
{
|
||||
try
|
||||
|
||||
Reference in new issue
Block a user