Silo Improvements on Client Side
@@ -2480,6 +2480,7 @@ QuicConnSetConfiguration(
Configuration);
QuicConfigurationAddRef(Configuration);
+ QuicConfigurationAttachSilo(Configuration);
Connection->Configuration = Configuration;
QuicConnApplyNewSettings(
Connection,
@@ -2497,7 +2498,7 @@ QuicConnSetConfiguration(
QuicConnOnQuicVersionSet(Connection);
Status = QuicCryptoOnVersionChange(&Connection->Crypto);
if (QUIC_FAILED(Status)) {
- return Status;
+ goto Error;
}
}
@@ -2522,7 +2523,8 @@ QuicConnSetConfiguration(
"Allocation of '%s' failed. (%llu bytes)",
"OrigDestCID",
sizeof(QUIC_CID) + DestCid->CID.Length);
- return QUIC_STATUS_OUT_OF_MEMORY;
+ Status = QUIC_STATUS_OUT_OF_MEMORY;
+ goto Error;
}
Connection->OrigDestCID->Length = DestCid->CID.Length;
@@ -2535,7 +2537,7 @@ QuicConnSetConfiguration(
if (!QuicConnPostAcceptValidatePeerTransportParameters(Connection)) {
QuicConnTransportError(Connection, QUIC_ERROR_CONNECTION_REFUSED);
Status = QUIC_STATUS_INVALID_PARAMETER;
- goto Error;
+ goto Cleanup;
}
Status =
@@ -2544,7 +2546,7 @@ QuicConnSetConfiguration(
Connection->Configuration->AlpnListLength,
Connection->Configuration->AlpnList);
if (QUIC_FAILED(Status)) {
- goto Error;
+ goto Cleanup;
}
Connection->Crypto.TlsState.ClientAlpnList = NULL;
Connection->Crypto.TlsState.ClientAlpnListLength = 0;
@@ -2552,7 +2554,7 @@ QuicConnSetConfiguration(
Status = QuicConnGenerateLocalTransportParameters(Connection, &LocalTP);
if (QUIC_FAILED(Status)) {
- goto Error;
+ goto Cleanup;
}
//
@@ -2577,10 +2579,14 @@ QuicConnSetConfiguration(
Configuration->SecurityConfig,
&LocalTP);
-Error:
+Cleanup:
QuicCryptoTlsCleanupTransportParameters(&LocalTP);
+Error:
+
+ QuicConfigurationDetachSilo();
+
return Status;
}
