diff options
author | Craig Tiller <ctiller@google.com> | 2015-03-02 10:56:33 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-03-02 10:56:33 -0800 |
commit | bb88a048cdc5f0f7157eab9fef5168f27ade624b (patch) | |
tree | 82744473ee1380aa8444f18a2cb1f491004552bd | |
parent | 45115845cc116022647e62b2e7627b261a6c4f4b (diff) |
Add clarifying comment
-rw-r--r-- | src/core/transport/chttp2_transport.c | 6 | ||||
-rwxr-xr-x | tools/run_tests/run_lcov.sh | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 1ad4819fd1..8d4a978963 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -531,6 +531,12 @@ static void destroy_transport(grpc_transport *gt) { drop_connection(t); unlock(t); + /* The drop_connection() above puts the transport into an error state, and + the follow-up unlock should then (as part of the cleanup work it does) + ensure that cb is NULL, and therefore not call back anything further. + This check validates this very subtle behavior. + It's shutdown path, so I don't believe an extra lock pair is going to be + problematic for performance. */ lock(t); GPR_ASSERT(!t->cb); unlock(t); diff --git a/tools/run_tests/run_lcov.sh b/tools/run_tests/run_lcov.sh index 292aec4548..69b1de6b89 100755 --- a/tools/run_tests/run_lcov.sh +++ b/tools/run_tests/run_lcov.sh @@ -35,7 +35,7 @@ out=`realpath ${1:-coverage}` root=`realpath $(dirname $0)/../..` tmp=`mktemp` cd $root -tools/run_tests/run_tests.py -c gcov -l c c++ +tools/run_tests/run_tests.py -c gcov -l c c++ || true lcov --capture --directory . --output-file $tmp genhtml $tmp --output-directory $out rm $tmp |