aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-05-07 08:22:17 -0700
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-05-07 08:22:17 -0700
commit46e46ed9ca8ade0c2248d3258af0e091e33bc17f (patch)
tree0ad4c863e2fa3ae259ee3316dc8f7058a6a5415e /src/core
parent2da029647803aa26e393faa1422beecae7d1805a (diff)
parent63733efd730316c0317a5df4f288aac242014d91 (diff)
Merge github.com:grpc/grpc into dont-signal-me
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;
+ }
}
}