aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-05-07 13:15:38 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-05-07 13:15:38 -0700
commitc354c51cf4022962a124f72c25f6a511782aa4f5 (patch)
tree57b6e9a4d765e0991e2e1351c594c65c0c0ce0b0 /src/core
parentae35546ddaf6225bc35545df05b65a560e6d52f3 (diff)
If we have closed the transport, dont try reading
Diffstat (limited to 'src/core')
-rw-r--r--src/core/transport/chttp2_transport.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c
index dae1b1e1b7..e536438646 100644
--- a/src/core/transport/chttp2_transport.c
+++ b/src/core/transport/chttp2_transport.c
@@ -1928,8 +1928,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;