From c354c51cf4022962a124f72c25f6a511782aa4f5 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 7 May 2015 13:15:38 -0700 Subject: If we have closed the transport, dont try reading --- src/core/transport/chttp2_transport.c | 6 ++++-- 1 file 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; -- cgit v1.2.3