aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-04-13 20:47:37 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-04-13 20:47:37 -0700
commitf4cc2f8fe42e4275cad7c29152e4a962647bef67 (patch)
treeee972396ba1b10898309136733e9c30d661f5e99 /test/core/end2end
parent317f68e5b28a62c30f176d991bc190210133c2a0 (diff)
Fix inf loop
Diffstat (limited to 'test/core/end2end')
-rw-r--r--test/core/end2end/fuzzers/api_fuzzer.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c
index ab3e42fe5a..1268260b59 100644
--- a/test/core/end2end/fuzzers/api_fuzzer.c
+++ b/test/core/end2end/fuzzers/api_fuzzer.c
@@ -199,7 +199,10 @@ typedef struct {
static void do_connect(grpc_exec_ctx *exec_ctx, void *arg, bool success) {
future_connect *fc = arg;
- if (g_server) {
+ if (!success) {
+ *fc->ep = NULL;
+ grpc_exec_ctx_enqueue(exec_ctx, fc->closure, false, NULL);
+ } else if (g_server != NULL) {
abort();
} else {
sched_connect(exec_ctx, fc->closure, fc->ep, fc->deadline);
@@ -208,7 +211,7 @@ static void do_connect(grpc_exec_ctx *exec_ctx, void *arg, bool success) {
}
static void sched_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, gpr_timespec deadline) {
- if (gpr_time_cmp(deadline, gpr_now(deadline.clock_type)) > 0) {
+ if (gpr_time_cmp(deadline, gpr_now(deadline.clock_type)) <= 0) {
*ep = NULL;
grpc_exec_ctx_enqueue(exec_ctx, closure, false, NULL);
return;