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

This commit is contained in:
Tatsuhiro Tsujikawa 2014-01-19 00:38:11 +09:00
parent d0968ea609
commit becc206ba9
3 changed files with 9 additions and 5 deletions

View File

@ -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() int Http2DownstreamConnection::on_read()

View File

@ -905,9 +905,8 @@ ssize_t downstream_data_read_callback(nghttp2_session *session,
// Send WINDOW_UPDATE before buffer is empty to avoid delay because // Send WINDOW_UPDATE before buffer is empty to avoid delay because
// of RTT. // of RTT.
if(*eof != 1 && if(*eof != 1 &&
evbuffer_get_length(body) < SHRPX_HTTP2_UPSTREAM_OUTPUT_UPPER_THRES && evbuffer_get_length(body) < SHRPX_HTTP2_UPSTREAM_OUTPUT_UPPER_THRES) {
downstream->resume_read(SHRPX_NO_BUFFER) != 0) { downstream->resume_read(SHRPX_NO_BUFFER);
DLOG(WARNING, downstream) << "Sending WINDOW_UPDATE failed";
} }
if(nread == 0 && *eof != 1) { if(nread == 0 && *eof != 1) {
return NGHTTP2_ERR_DEFERRED; return NGHTTP2_ERR_DEFERRED;

View File

@ -359,7 +359,8 @@ void HttpDownstreamConnection::pause_read(IOCtrlReason reason)
int HttpDownstreamConnection::resume_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() void HttpDownstreamConnection::force_resume_read()