pull/11888/head
Craig Tiller 8 years ago
parent fa5c6215be
commit 565d4c1e88
  1. 4
      src/core/ext/filters/client_channel/channel_connectivity.c
  2. 2
      src/core/ext/filters/client_channel/connector.h
  3. 3
      src/core/ext/transport/chttp2/transport/writing.c
  4. 8
      src/core/lib/iomgr/iomgr.c
  5. 12
      test/core/util/test_tcp_server.c

@ -186,8 +186,8 @@ static void watcher_timer_init(grpc_exec_ctx *exec_ctx, void *arg,
watcher_timer_init_arg *wa = (watcher_timer_init_arg *)arg;
grpc_timer_init(exec_ctx, &wa->w->alarm,
gpr_convert_clock_type(wa->deadline, GPR_CLOCK_MONOTONIC),
&wa->w->on_timeout, gpr_now(GPR_CLOCK_MONOTONIC));
grpc_timespec_to_millis(exec_ctx, wa->deadline),
&wa->w->on_timeout);
gpr_free(wa);
}

@ -34,7 +34,7 @@ typedef struct {
/** set of pollsets interested in this connection */
grpc_pollset_set *interested_parties;
/** deadline for connection */
gpr_timespec deadline;
grpc_millis deadline;
/** channel arguments (to be passed to transport) */
const grpc_channel_args *channel_args;
} grpc_connect_in_args;

@ -261,8 +261,7 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write(
t->ping_state.pings_before_data_required =
t->ping_policy.max_pings_without_data;
if (!t->is_client) {
t->ping_recv_state.last_ping_recv_time =
gpr_inf_past(GPR_CLOCK_MONOTONIC);
t->ping_recv_state.last_ping_recv_time = 0;
t->ping_recv_state.ping_strikes = 0;
}
} else {

@ -47,14 +47,8 @@ void grpc_iomgr_init(grpc_exec_ctx *exec_ctx) {
gpr_mu_init(&g_mu);
gpr_cv_init(&g_rcv);
grpc_exec_ctx_global_init();
<<<<<<< HEAD
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_timer_list_init(&exec_ctx);
grpc_exec_ctx_finish(&exec_ctx);
=======
grpc_executor_init(exec_ctx);
grpc_timer_list_init(gpr_now(GPR_CLOCK_MONOTONIC));
>>>>>>> 4708a21c8144f9fed3c90ea8fa153aa20302a1d7
grpc_timer_list_init(exec_ctx);
g_root_object.next = g_root_object.prev = &g_root_object;
g_root_object.name = "root";
grpc_network_status_init();

@ -31,6 +31,7 @@
#include "src/core/lib/iomgr/resolve_address.h"
#include "src/core/lib/iomgr/tcp_server.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
static void on_server_destroyed(grpc_exec_ctx *exec_ctx, void *data,
grpc_error *error) {
@ -78,14 +79,13 @@ void test_tcp_server_start(test_tcp_server *server, int port) {
void test_tcp_server_poll(test_tcp_server *server, int seconds) {
grpc_pollset_worker *worker = NULL;
gpr_timespec deadline =
gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC),
gpr_time_from_seconds(seconds, GPR_TIMESPAN));
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_millis deadline = grpc_timespec_to_millis(
&exec_ctx, grpc_timeout_seconds_to_deadline(seconds));
gpr_mu_lock(server->mu);
GRPC_LOG_IF_ERROR("pollset_work",
grpc_pollset_work(&exec_ctx, server->pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC), deadline));
GRPC_LOG_IF_ERROR(
"pollset_work",
grpc_pollset_work(&exec_ctx, server->pollset, &worker, deadline));
gpr_mu_unlock(server->mu);
grpc_exec_ctx_finish(&exec_ctx);
}

Loading…
Cancel
Save