diff --git a/quic/core/quic_flags_list.h b/quic/core/quic_flags_list.h
index 3ff0043..37da0e8 100644
--- a/quic/core/quic_flags_list.h
+++ b/quic/core/quic_flags_list.h
@@ -99,8 +99,6 @@
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_require_handshake_confirmation, false)
 // If true, reset per packet state before processing undecryptable packets.
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_reset_per_packet_state_for_undecryptable_packets, true)
-// If true, restore connection context in various callbacks in TlsServerHandshaker.
-QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_tls_restore_connection_context_in_callbacks, true)
 // If true, send PATH_RESPONSE upon receiving PATH_CHALLENGE regardless of perspective. --gfe2_reloadable_flag_quic_start_peer_migration_earlier has to be true before turn on this flag.
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_send_path_response2, true)
 // If true, set burst token to 2 in cwnd bootstrapping experiment.
diff --git a/quic/core/tls_server_handshaker.cc b/quic/core/tls_server_handshaker.cc
index bc0d361..d35b923 100644
--- a/quic/core/tls_server_handshaker.cc
+++ b/quic/core/tls_server_handshaker.cc
@@ -150,16 +150,13 @@
       (handshaker->expected_ssl_error() == SSL_ERROR_PENDING_TICKET);
 
   absl::optional<QuicConnectionContextSwitcher> context_switcher;
-  if (handshaker->restore_connection_context_in_callbacks_) {
-    QUIC_RELOADABLE_FLAG_COUNT_N(
-        quic_tls_restore_connection_context_in_callbacks, 1, 3);
-    if (is_async) {
-      context_switcher.emplace(handshaker->connection_context());
-    }
-    QUIC_TRACESTRING(
-        absl::StrCat("TLS ticket decryption done. len(decrypted_ticket):",
-                     handshaker->decrypted_session_ticket_.size()));
+
+  if (is_async) {
+    context_switcher.emplace(handshaker->connection_context());
   }
+  QUIC_TRACESTRING(
+      absl::StrCat("TLS ticket decryption done. len(decrypted_ticket):",
+                   handshaker->decrypted_session_ticket_.size()));
 
   // DecryptCallback::Run could be called synchronously. When that happens, we
   // are currently in the middle of a call to AdvanceHandshake.
@@ -733,18 +730,14 @@
                 << ", is_sync:" << is_sync
                 << ", len(signature):" << signature.size();
   absl::optional<QuicConnectionContextSwitcher> context_switcher;
-  if (restore_connection_context_in_callbacks_) {
-    QUIC_RELOADABLE_FLAG_COUNT_N(
-        quic_tls_restore_connection_context_in_callbacks, 2, 3);
 
-    if (!is_sync) {
-      context_switcher.emplace(connection_context());
-    }
-
-    QUIC_TRACESTRING(absl::StrCat("TLS compute signature done. ok:", ok,
-                                  ", len(signature):", signature.size()));
+  if (!is_sync) {
+    context_switcher.emplace(connection_context());
   }
 
+  QUIC_TRACESTRING(absl::StrCat("TLS compute signature done. ok:", ok,
+                                ", len(signature):", signature.size()));
+
   if (ok) {
     cert_verify_sig_ = std::move(signature);
     proof_source_details_ = std::move(details);
@@ -1013,19 +1006,15 @@
                 << ", len(ticket_encryption_key):"
                 << ticket_encryption_key.size();
   absl::optional<QuicConnectionContextSwitcher> context_switcher;
-  if (restore_connection_context_in_callbacks_) {
-    QUIC_RELOADABLE_FLAG_COUNT_N(
-        quic_tls_restore_connection_context_in_callbacks, 3, 3);
-
-    if (!is_sync) {
-      context_switcher.emplace(connection_context());
-    }
-
-    QUIC_TRACESTRING(absl::StrCat(
-        "TLS select certificate done: ok:", ok,
-        ", len(handshake_hints):", handshake_hints.size(),
-        ", len(ticket_encryption_key):", ticket_encryption_key.size()));
+  if (!is_sync) {
+    context_switcher.emplace(connection_context());
   }
+
+  QUIC_TRACESTRING(absl::StrCat(
+      "TLS select certificate done: ok:", ok,
+      ", len(handshake_hints):", handshake_hints.size(),
+      ", len(ticket_encryption_key):", ticket_encryption_key.size()));
+
   ticket_encryption_key_ = std::string(ticket_encryption_key);
   select_cert_status_ = QUIC_FAILURE;
   cert_matched_sni_ = cert_matched_sni;
diff --git a/quic/core/tls_server_handshaker.h b/quic/core/tls_server_handshaker.h
index 9a492c5..57aa652 100644
--- a/quic/core/tls_server_handshaker.h
+++ b/quic/core/tls_server_handshaker.h
@@ -325,7 +325,6 @@
   QuicTime now() const { return session()->GetClock()->Now(); }
 
   QuicConnectionContext* connection_context() {
-    QUICHE_DCHECK(restore_connection_context_in_callbacks_);
     return session()->connection()->context();
   }
 
@@ -376,8 +375,6 @@
   // The last received CachedNetworkParameters from a validated address token.
   mutable std::unique_ptr<CachedNetworkParameters>
       last_received_cached_network_params_;
-  const bool restore_connection_context_in_callbacks_ =
-      GetQuicReloadableFlag(quic_tls_restore_connection_context_in_callbacks);
 
   bool cert_matched_sni_ = false;
 };
