diff options
author | 2015-07-23 14:00:58 -0700 | |
---|---|---|
committer | 2015-07-23 14:00:58 -0700 | |
commit | 994c2620e3540de869aee52b2ad0678006ef8a6b (patch) | |
tree | a1f549798d4dea686c386f4811d6e88813960ae2 /src/core/iomgr | |
parent | 1ed96ba2925c50e581ecbed1c2464aa55559e463 (diff) |
Fix flow control
- sending of window updates is now integrated with the primary write
path, making this far more robust
- iomgr starts up after shutdown correctly again
Diffstat (limited to 'src/core/iomgr')
-rw-r--r-- | src/core/iomgr/iomgr.c | 1 | ||||
-rw-r--r-- | src/core/iomgr/tcp_posix.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/core/iomgr/iomgr.c b/src/core/iomgr/iomgr.c index a18c176b30..aa4bc6e20d 100644 --- a/src/core/iomgr/iomgr.c +++ b/src/core/iomgr/iomgr.c @@ -88,6 +88,7 @@ void grpc_kick_poller(void) { void grpc_iomgr_init(void) { gpr_thd_id id; + g_shutdown = 0; gpr_mu_init(&g_mu); gpr_cv_init(&g_rcv); grpc_alarm_list_init(gpr_now(GPR_CLOCK_MONOTONIC)); diff --git a/src/core/iomgr/tcp_posix.c b/src/core/iomgr/tcp_posix.c index 1e8432d463..63a8a2720e 100644 --- a/src/core/iomgr/tcp_posix.c +++ b/src/core/iomgr/tcp_posix.c @@ -319,7 +319,7 @@ static void call_read_cb(grpc_tcp *tcp, gpr_slice *slices, size_t nslices, gpr_log(GPR_DEBUG, "read: status=%d", status); for (i = 0; i < nslices; i++) { char *dump = gpr_dump_slice(slices[i], GPR_DUMP_HEX | GPR_DUMP_ASCII); - gpr_log(GPR_DEBUG, "READ: %s", dump); + gpr_log(GPR_DEBUG, "READ %p: %s", tcp, dump); gpr_free(dump); } } @@ -448,7 +448,7 @@ static void grpc_tcp_notify_on_read(grpc_endpoint *ep, grpc_endpoint_read_cb cb, grpc_fd_notify_on_read(tcp->em_fd, &tcp->read_closure); } else { tcp->handle_read_closure.cb_arg = tcp; - grpc_iomgr_add_callback(&tcp->handle_read_closure); + grpc_iomgr_add_delayed_callback(&tcp->handle_read_closure, 1); } } |