aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/security/transport/security_handshaker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib/security/transport/security_handshaker.cc')
-rw-r--r--src/core/lib/security/transport/security_handshaker.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/lib/security/transport/security_handshaker.cc b/src/core/lib/security/transport/security_handshaker.cc
index 57dd3406bc..d9ba3483e6 100644
--- a/src/core/lib/security/transport/security_handshaker.cc
+++ b/src/core/lib/security/transport/security_handshaker.cc
@@ -232,6 +232,10 @@ static grpc_error* on_handshake_next_done_locked(
const unsigned char* bytes_to_send, size_t bytes_to_send_size,
tsi_handshaker_result* handshaker_result) {
grpc_error* error = GRPC_ERROR_NONE;
+ // Handshaker was shutdown.
+ if (h->shutdown) {
+ return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Handshaker shutdown");
+ }
// Read more if we need to.
if (result == TSI_INCOMPLETE_DATA) {
GPR_ASSERT(bytes_to_send_size == 0);