Don't Use App Closed until 1-RTT Keys
@@ -1425,9 +1425,9 @@ QuicConnTryClose(
if (!ClosedRemotely) {
if ((Flags & QUIC_CLOSE_APPLICATION) &&
- Connection->Crypto.TlsState.WriteKeys[QUIC_PACKET_KEY_1_RTT] == NULL) {
+ Connection->Crypto.TlsState.WriteKey < QUIC_PACKET_KEY_1_RTT) {
//
- // Application close can only happen if we have 1-RTT keys.
+ // Application close can only happen if we are using 1-RTT keys.
// Otherwise we have to send "user_canceled" TLS error code as a
// connection close. Overwrite all application provided parameters.
//
