aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-05-07 08:23:27 -0700
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-05-07 08:23:27 -0700
commit47838544e0b396ad59dbca16eae10367af8de151 (patch)
treefb2065301fe9cfb0af60ad7b10ba9a9aedb374f9 /src/core
parentd1abc814a7e80fdb959c7f13bc1189a1bbd083a1 (diff)
parent63733efd730316c0317a5df4f288aac242014d91 (diff)
Merge github.com:grpc/grpc into do-the-right-thing-put-it-in-a-bin
Diffstat (limited to 'src/core')
-rw-r--r--src/core/transport/chttp2_transport.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c
index dae1b1e1b7..885838ec5d 100644
--- a/src/core/transport/chttp2_transport.c
+++ b/src/core/transport/chttp2_transport.c
@@ -823,24 +823,26 @@ static void unlock(transport *t) {
finish_reads(t);
/* gather any callbacks that need to be made */
- if (!t->calling_back && cb) {
+ if (!t->calling_back) {
perform_callbacks = prepare_callbacks(t);
if (perform_callbacks) {
t->calling_back = 1;
}
- if (t->error_state == ERROR_STATE_SEEN && !t->writing) {
- call_closed = 1;
- t->calling_back = 1;
- t->cb = NULL; /* no more callbacks */
- t->error_state = ERROR_STATE_NOTIFIED;
- }
- if (t->num_pending_goaways) {
- goaways = t->pending_goaways;
- num_goaways = t->num_pending_goaways;
- t->pending_goaways = NULL;
- t->num_pending_goaways = 0;
- t->cap_pending_goaways = 0;
- t->calling_back = 1;
+ if (cb) {
+ if (t->error_state == ERROR_STATE_SEEN && !t->writing && !t->calling_back) {
+ call_closed = 1;
+ t->calling_back = 1;
+ t->cb = NULL; /* no more callbacks */
+ t->error_state = ERROR_STATE_NOTIFIED;
+ }
+ if (t->num_pending_goaways) {
+ goaways = t->pending_goaways;
+ num_goaways = t->num_pending_goaways;
+ t->pending_goaways = NULL;
+ t->num_pending_goaways = 0;
+ t->cap_pending_goaways = 0;
+ t->calling_back = 1;
+ }
}
}