Commit becc206b authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Don't show warning WINDOW_UPDATE failure for HTTP/1 downstream

parent d0968ea6
......@@ -473,7 +473,11 @@ int Http2DownstreamConnection::resume_read(IOCtrlReason reason)
}
}
}
return (rv1 == 0 && rv2 == 0) ? 0 : -1;
if(rv1 == 0 && rv2 == 0) {
return 0;
}
DLOG(WARNING, this) << "Sending WINDOW_UPDATE failed";
return -1;
}
int Http2DownstreamConnection::on_read()
......
......@@ -905,9 +905,8 @@ ssize_t downstream_data_read_callback(nghttp2_session *session,
// Send WINDOW_UPDATE before buffer is empty to avoid delay because
// of RTT.
if(*eof != 1 &&
evbuffer_get_length(body) < SHRPX_HTTP2_UPSTREAM_OUTPUT_UPPER_THRES &&
downstream->resume_read(SHRPX_NO_BUFFER) != 0) {
DLOG(WARNING, downstream) << "Sending WINDOW_UPDATE failed";
evbuffer_get_length(body) < SHRPX_HTTP2_UPSTREAM_OUTPUT_UPPER_THRES) {
downstream->resume_read(SHRPX_NO_BUFFER);
}
if(nread == 0 && *eof != 1) {
return NGHTTP2_ERR_DEFERRED;
......
......@@ -359,7 +359,8 @@ void HttpDownstreamConnection::pause_read(IOCtrlReason reason)
int HttpDownstreamConnection::resume_read(IOCtrlReason reason)
{
return ioctrl_.resume_read(reason) ? 0 : -1;
ioctrl_.resume_read(reason);
return 0;
}
void HttpDownstreamConnection::force_resume_read()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment