diff options
author | Daniel Stenberg <daniel@haxx.se> | 2018-08-20 13:19:08 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-08-20 13:19:08 +0200 |
commit | 1307081c7045516fd04e38c797a9c7dab7f4d5d9 (patch) | |
tree | e6673976feb3906b11d27bc2c42e63b79d13c836 | |
parent | a040ff88e4698bdee1eddc0cdb5a7fb65db49201 (diff) | |
download | curl-bagder/http2-done-unassigned.tar.gz |
http2: avoid set_stream_user_data() before stream is assignedbagder/http2-done-unassigned
... before the stream is started, we have it set to -1.
Fixes #2894
-rw-r--r-- | lib/http2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/http2.c b/lib/http2.c index 9380ca7cf..350642019 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -1178,7 +1178,8 @@ void Curl_http2_done(struct connectdata *conn, bool premature) httpc->pause_stream_id = 0; } } - if(http->stream_id) { + /* -1 means unassigned and 0 means cleared */ + if(http->stream_id > 0) { int rv = nghttp2_session_set_stream_user_data(httpc->h2, http->stream_id, 0); if(rv) { |