Skip to content

Commit

Permalink
clear callbacks vector after invoking callbacks
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Puncel <mpuncel@squareup.com>
  • Loading branch information
mpuncel committed Oct 16, 2020
1 parent 76014af commit 6b736ed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/extensions/transport_sockets/tls/ssl_socket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ void ClientSslSocketFactory::onAddOrUpdateSecret() {
for (const auto& cb : secrets_ready_callbacks_) {
cb();
}
secrets_ready_callbacks_.clear();
}
stats_.ssl_context_update_by_sds_.inc();
}
Expand Down Expand Up @@ -434,6 +435,7 @@ void ServerSslSocketFactory::onAddOrUpdateSecret() {
for (const auto& cb : secrets_ready_callbacks_) {
cb();
}
secrets_ready_callbacks_.clear();
}
stats_.ssl_context_update_by_sds_.inc();
}
Expand Down

0 comments on commit 6b736ed

Please sign in to comment.