1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-23 16:48:49 -05:00

http2: avoid set_stream_user_data() before stream is assigned

... before the stream is started, we have it set to -1.

Fixes #2894
Closes #2898
This commit is contained in:
Daniel Stenberg 2018-08-20 13:19:08 +02:00
parent 9dad3bd665
commit e29ff2be2f
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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) {