aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/httpcli/httpcli.c
diff options
context:
space:
mode:
authorGravatar ctiller <ctiller@google.com>2015-01-07 12:13:17 -0800
committerGravatar Nicolas Noble <nnoble@google.com>2015-01-09 17:23:18 -0800
commite4b409364e4c493a66d4b2a6fe897075aa5c174e (patch)
tree29467626f50aea49e072e15004dd141625146709 /src/core/httpcli/httpcli.c
parent8232204a36712553b9eedb2dacab13b7c38642c6 (diff)
Add a --forever flag, to continuously run tests as things change.
Change on 2015/01/07 by ctiller <ctiller@google.com> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=83451760
Diffstat (limited to 'src/core/httpcli/httpcli.c')
-rw-r--r--src/core/httpcli/httpcli.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/httpcli/httpcli.c b/src/core/httpcli/httpcli.c
index 2143eeb63d..06d73e40f5 100644
--- a/src/core/httpcli/httpcli.c
+++ b/src/core/httpcli/httpcli.c
@@ -101,11 +101,12 @@ static void on_read(void *user_data, gpr_slice *slices, size_t nslices,
switch (status) {
case GRPC_ENDPOINT_CB_OK:
- grpc_endpoint_notify_on_read(req->ep, on_read, req);
+ grpc_endpoint_notify_on_read(req->ep, on_read, req, gpr_inf_future);
break;
case GRPC_ENDPOINT_CB_EOF:
case GRPC_ENDPOINT_CB_ERROR:
case GRPC_ENDPOINT_CB_SHUTDOWN:
+ case GRPC_ENDPOINT_CB_TIMED_OUT:
if (!req->have_read_byte) {
next_address(req);
} else {
@@ -122,7 +123,7 @@ done:
static void on_written(internal_request *req) {
gpr_log(GPR_DEBUG, "%s", __FUNCTION__);
- grpc_endpoint_notify_on_read(req->ep, on_read, req);
+ grpc_endpoint_notify_on_read(req->ep, on_read, req, gpr_inf_future);
}
static void done_write(void *arg, grpc_endpoint_cb_status status) {
@@ -135,6 +136,7 @@ static void done_write(void *arg, grpc_endpoint_cb_status status) {
case GRPC_ENDPOINT_CB_EOF:
case GRPC_ENDPOINT_CB_SHUTDOWN:
case GRPC_ENDPOINT_CB_ERROR:
+ case GRPC_ENDPOINT_CB_TIMED_OUT:
next_address(req);
break;
}
@@ -143,8 +145,8 @@ static void done_write(void *arg, grpc_endpoint_cb_status status) {
static void start_write(internal_request *req) {
gpr_slice_ref(req->request_text);
gpr_log(GPR_DEBUG, "%s", __FUNCTION__);
- switch (
- grpc_endpoint_write(req->ep, &req->request_text, 1, done_write, req)) {
+ switch (grpc_endpoint_write(req->ep, &req->request_text, 1, done_write, req,
+ gpr_inf_future)) {
case GRPC_ENDPOINT_WRITE_DONE:
on_written(req);
break;