diff options
author | Daniel Stenberg <daniel@haxx.se> | 2016-08-28 23:28:52 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2016-08-28 23:29:38 +0200 |
commit | 0d729d9e015cba7a05e16a25b21156abf4ca6409 (patch) | |
tree | 330f7ec321eb8f1d04dd94e9bcb1e39216a16082 /lib | |
parent | c3e906e9cd0f17be5ffc13ca258b87049da8d544 (diff) |
http2: return CURLE_HTTP2_STREAM for unexpected stream close
Follow-up to c3e906e9cd0f, seems like a more appropriate error code
Suggested-by: Jay Satiro
Diffstat (limited to 'lib')
-rw-r--r-- | lib/http2.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/http2.c b/lib/http2.c index 6fc7cfa28..97094202a 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -1219,8 +1219,7 @@ static ssize_t http2_handle_stream_close(struct connectdata *conn, DEBUGASSERT(data->state.drain == 0); - /* Reset to FALSE to prevent infinite loop in readwrite_data - function. */ + /* Reset to FALSE to prevent infinite loop in readwrite_data function. */ stream->closed = FALSE; if(stream->error_code != NGHTTP2_NO_ERROR) { failf(data, "HTTP/2 stream %u was not closed cleanly: %s (err %d)", @@ -1567,7 +1566,7 @@ static ssize_t http2_send(struct connectdata *conn, int sockindex, if(stream->stream_id != -1) { if(stream->close_handled) { infof(conn->data, "stream %d closed\n", stream->stream_id); - *err = CURLE_HTTP2; + *err = CURLE_HTTP2_STREAM; return -1; } else if(stream->closed) { |