Skip to content

Commit

Permalink
Fixed HTTP/3 test crashes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ManickaP committed Apr 16, 2021
1 parent fc53ee7 commit d05e838
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public Http3LoopbackServer(QuicImplementationProvider quicImplementationProvider
{
options ??= new GenericLoopbackOptions();

_cert = Configuration.Certificates.GetSelfSigned13ServerCertificate();
_cert = Configuration.Certificates.GetServerCertificate();

var sslOpts = new SslServerAuthenticationOptions
{
Expand All @@ -35,7 +35,7 @@ public Http3LoopbackServer(QuicImplementationProvider quicImplementationProvider
new SslApplicationProtocol("h3-30"),
new SslApplicationProtocol("h3-29")
},
//ServerCertificate = _cert,
ServerCertificate = _cert,
ClientCertificateRequired = false
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,10 @@ private ValueTask ShutdownAsync(
QUIC_CONNECTION_SHUTDOWN_FLAGS Flags,
long ErrorCode)
{
Debug.Assert(!_state.ShutdownTcs.Task.IsCompleted);
if (_state.ShutdownTcs.Task.IsCompleted)
{
return ValueTask.CompletedTask;
}

// Store the connection into the GCHandle'd state to prevent GC if user calls ShutdownAsync and gets rid of all references to the MsQuicConnection.
Debug.Assert(_state.Connection == null);
Expand Down

0 comments on commit d05e838

Please sign in to comment.