Merge pull request #5595 from ctiller/trycancel

Fix leak: dont become writable if writes are closed
pull/5607/head
Vijay Pai 9 years ago
commit ac966624b7
  1. 8
      src/core/transport/chttp2_transport.c

@ -432,6 +432,14 @@ static void close_transport_locked(grpc_exec_ctx *exec_ctx,
if (t->ep) {
allow_endpoint_shutdown_locked(exec_ctx, t);
}
/* flush writable stream list to avoid dangling references */
grpc_chttp2_stream_global *stream_global;
grpc_chttp2_stream_writing *stream_writing;
while (grpc_chttp2_list_pop_writable_stream(
&t->global, &t->writing, &stream_global, &stream_writing)) {
GRPC_CHTTP2_STREAM_UNREF(exec_ctx, stream_global, "chttp2_writing");
}
}
}

Loading…
Cancel
Save