aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2016-10-30 15:06:41 +0100
committerGravatar David Garcia Quintas <dgq@google.com>2016-10-30 15:06:41 +0100
commit6cb547443b7674279a069f51481cc7b30193c6da (patch)
tree1b237293f2e53bdd33be7b696f8c0ca41257ead6
parent98da61ba109405f173fbe8e11d169ab41fc407fb (diff)
parentde76cdbcb87c6b4e9be099e50703485af09ba785 (diff)
Merge branch 'master' of github.com:grpc/grpc into grpclb_leaks_fix
-rw-r--r--src/core/lib/iomgr/port.h2
-rw-r--r--src/core/lib/iomgr/resource_quota.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/src/core/lib/iomgr/port.h b/src/core/lib/iomgr/port.h
index c0bb3b5a23..f1897bb91f 100644
--- a/src/core/lib/iomgr/port.h
+++ b/src/core/lib/iomgr/port.h
@@ -90,7 +90,6 @@
#define GRPC_POSIX_SOCKETUTILS
#endif
#elif defined(GPR_APPLE)
-#define GRPC_HAVE_IP_PKTINFO 1
#define GRPC_HAVE_SO_NOSIGPIPE 1
#define GRPC_HAVE_UNIX_SOCKET 1
#define GRPC_MSG_IOVLEN_TYPE int
@@ -102,7 +101,6 @@
#define GRPC_TIMER_USE_GENERIC 1
#elif defined(GPR_FREEBSD)
#define GRPC_HAVE_IPV6_RECVPKTINFO 1
-#define GRPC_HAVE_IP_PKTINFO 1
#define GRPC_HAVE_SO_NOSIGPIPE 1
#define GRPC_HAVE_UNIX_SOCKET 1
#define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1
diff --git a/src/core/lib/iomgr/resource_quota.c b/src/core/lib/iomgr/resource_quota.c
index bfc905845d..e39cf28e35 100644
--- a/src/core/lib/iomgr/resource_quota.c
+++ b/src/core/lib/iomgr/resource_quota.c
@@ -166,8 +166,11 @@ static void rq_step(grpc_exec_ctx *exec_ctx, void *rq, grpc_error *error) {
do {
if (rq_alloc(exec_ctx, resource_quota)) goto done;
} while (rq_reclaim_from_per_user_free_pool(exec_ctx, resource_quota));
- rq_reclaim(exec_ctx, resource_quota, false) ||
- rq_reclaim(exec_ctx, resource_quota, true);
+
+ if (!rq_reclaim(exec_ctx, resource_quota, false)) {
+ rq_reclaim(exec_ctx, resource_quota, true);
+ }
+
done:
grpc_resource_quota_internal_unref(exec_ctx, resource_quota);
}