diff --git a/src/shrpx.cc b/src/shrpx.cc index 1c6b4728..e03d94b4 100644 --- a/src/shrpx.cc +++ b/src/shrpx.cc @@ -465,7 +465,6 @@ void renew_ticket_key_cb(struct ev_loop *loop, ev_timer *w, int revents) { if (LOG_ENABLED(INFO)) { LOG(INFO) << "failed to renew ticket key"; } - mod_config()->ticket_keys.reset(); return; } diff --git a/src/shrpx_ssl.cc b/src/shrpx_ssl.cc index 9e459942..89bce944 100644 --- a/src/shrpx_ssl.cc +++ b/src/shrpx_ssl.cc @@ -160,8 +160,8 @@ int ticket_key_cb(SSL *ssl, unsigned char *key_name, unsigned char *iv, #endif // NOTHREADS if (!ticket_keys) { - /* No ticket keys available. Perform full handshake */ - return 0; + // No ticket keys available. + return -1; } auto &keys = ticket_keys->keys; @@ -172,7 +172,7 @@ int ticket_key_cb(SSL *ssl, unsigned char *key_name, unsigned char *iv, if (LOG_ENABLED(INFO)) { CLOG(INFO, handler) << "session ticket key: RAND_bytes failed"; } - return 0; + return -1; } auto &key = keys[0];