Skip to content
Snippets Groups Projects
Commit 594856fe authored by Jan Tattermusch's avatar Jan Tattermusch
Browse files

Fix: Server side call with both streams closed doesnt get properly finalized

parent 78193bf0
No related branches found
No related tags found
No related merge requests found
...@@ -823,24 +823,26 @@ static void unlock(transport *t) { ...@@ -823,24 +823,26 @@ static void unlock(transport *t) {
finish_reads(t); finish_reads(t);
/* gather any callbacks that need to be made */ /* gather any callbacks that need to be made */
if (!t->calling_back && cb) { if (!t->calling_back) {
perform_callbacks = prepare_callbacks(t); perform_callbacks = prepare_callbacks(t);
if (perform_callbacks) { if (perform_callbacks) {
t->calling_back = 1; t->calling_back = 1;
} }
if (t->error_state == ERROR_STATE_SEEN && !t->writing) { if (cb) {
call_closed = 1; if (t->error_state == ERROR_STATE_SEEN && !t->writing && !t->calling_back) {
t->calling_back = 1; call_closed = 1;
t->cb = NULL; /* no more callbacks */ t->calling_back = 1;
t->error_state = ERROR_STATE_NOTIFIED; t->cb = NULL; /* no more callbacks */
} t->error_state = ERROR_STATE_NOTIFIED;
if (t->num_pending_goaways) { }
goaways = t->pending_goaways; if (t->num_pending_goaways) {
num_goaways = t->num_pending_goaways; goaways = t->pending_goaways;
t->pending_goaways = NULL; num_goaways = t->num_pending_goaways;
t->num_pending_goaways = 0; t->pending_goaways = NULL;
t->cap_pending_goaways = 0; t->num_pending_goaways = 0;
t->calling_back = 1; t->cap_pending_goaways = 0;
t->calling_back = 1;
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment