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 /src/core/transport | |
parent | 45115845cc116022647e62b2e7627b261a6c4f4b (diff) |
Add clarifying comment
Diffstat (limited to 'src/core/transport')
-rw-r--r-- | src/core/transport/chttp2_transport.c | 6 |
1 files changed, 6 insertions, 0 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); |