Move error ref to the the closure function instead of an internal function

pull/19320/head
Yash Tibrewal 6 years ago
parent 4ed889382a
commit 84d75d454e
  1. 4
      src/core/lib/security/transport/security_handshaker.cc

@ -195,7 +195,7 @@ void SecurityHandshaker::HandshakeFailedLocked(grpc_error* error) {
void SecurityHandshaker::OnPeerCheckedInner(grpc_error* error) { void SecurityHandshaker::OnPeerCheckedInner(grpc_error* error) {
MutexLock lock(&mu_); MutexLock lock(&mu_);
if (error != GRPC_ERROR_NONE || is_shutdown_) { if (error != GRPC_ERROR_NONE || is_shutdown_) {
HandshakeFailedLocked(GRPC_ERROR_REF(error)); HandshakeFailedLocked(error);
return; return;
} }
// Create zero-copy frame protector, if implemented. // Create zero-copy frame protector, if implemented.
@ -255,7 +255,7 @@ void SecurityHandshaker::OnPeerCheckedInner(grpc_error* error) {
void SecurityHandshaker::OnPeerCheckedFn(void* arg, grpc_error* error) { void SecurityHandshaker::OnPeerCheckedFn(void* arg, grpc_error* error) {
RefCountedPtr<SecurityHandshaker>(static_cast<SecurityHandshaker*>(arg)) RefCountedPtr<SecurityHandshaker>(static_cast<SecurityHandshaker*>(arg))
->OnPeerCheckedInner(error); ->OnPeerCheckedInner(GRPC_ERROR_REF(error));
} }
grpc_error* SecurityHandshaker::CheckPeerLocked() { grpc_error* SecurityHandshaker::CheckPeerLocked() {

Loading…
Cancel
Save