diff options
author | Yang Gao <yangg@google.com> | 2015-05-08 08:33:05 -0700 |
---|---|---|
committer | Yang Gao <yangg@google.com> | 2015-05-08 08:33:05 -0700 |
commit | bc2c63cda61c048332d8263fa658450cd8fcad37 (patch) | |
tree | ef4bd6bd219f6191cb4b82b20c36b70a37e80b24 /src/core/transport/chttp2_transport.c | |
parent | e1b5f9b2b236da5ef9ab55f4182c498e710a0e42 (diff) | |
parent | c354c51cf4022962a124f72c25f6a511782aa4f5 (diff) |
Merge pull request #1520 from ctiller/cancel-after-invoke
If we have closed the transport, dont try reading
Diffstat (limited to 'src/core/transport/chttp2_transport.c')
-rw-r--r-- | src/core/transport/chttp2_transport.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index ea24796f35..a6f9f782a1 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -1927,8 +1927,10 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, break; case GRPC_ENDPOINT_CB_OK: lock(t); - for (i = 0; i < nslices && process_read(t, slices[i]); i++) - ; + if (t->cb) { + for (i = 0; i < nslices && process_read(t, slices[i]); i++) + ; + } unlock(t); keep_reading = 1; break; |