]> granicus.if.org Git - curl/commitdiff
http2: clear the "drain counter" when a stream is closed
authorDaniel Stenberg <daniel@haxx.se>
Thu, 19 Apr 2018 18:01:52 +0000 (20:01 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 20 Apr 2018 20:18:19 +0000 (22:18 +0200)
This fixes the notorious "httpc->drain_total >= data->state.drain"
assert.

Reported-by: Anders Bakken
Fixes #1680
Closes #2509

lib/http2.c

index 077c03e6febcbef2b4b6b127284299801993ae9d..6ac69b9b5af3390453f3754cfdb69be3ec181869 100644 (file)
@@ -162,6 +162,7 @@ static CURLcode http2_disconnect(struct connectdata *conn,
   nghttp2_session_del(c->h2);
   Curl_safefree(c->inbuf);
   http2_stream_free(conn->data->req.protop);
+  conn->data->state.drain = 0;
 
   H2BUGF(infof(conn->data, "HTTP/2 DISCONNECT done\n"));