From e60183313b380ab0f28804240997b78af546fe27 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 20 Dec 2014 21:53:33 +0900 Subject: [PATCH] Document that calling nghttp2_submit_response to same stream twice is bad idea --- lib/includes/nghttp2/nghttp2.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/includes/nghttp2/nghttp2.h b/lib/includes/nghttp2/nghttp2.h index ecc515b6..46933e2c 100644 --- a/lib/includes/nghttp2/nghttp2.h +++ b/lib/includes/nghttp2/nghttp2.h @@ -2726,6 +2726,12 @@ int32_t nghttp2_submit_request(nghttp2_session *session, * Out of memory. * :enum:`NGHTTP2_ERR_INVALID_ARGUMENT` * The |stream_id| is 0. + * + * .. warning:: + * + * Calling this function twice for the same stream ID may lead to + * program crash. It is generally considered to a programming error + * to commit response twice. */ int nghttp2_submit_response(nghttp2_session *session, int32_t stream_id, const nghttp2_nv *nva, size_t nvlen,