Merge branch 'master' into change-stream-priority
This commit is contained in:
commit
f0443d3398
20
.travis.yml
20
.travis.yml
|
@ -27,12 +27,26 @@ before_install:
|
||||||
- $CC --version
|
- $CC --version
|
||||||
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
|
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
|
||||||
- $CC --version
|
- $CC --version
|
||||||
|
- go version
|
||||||
before_script:
|
before_script:
|
||||||
|
# First build spdylay, since integration tests require it.
|
||||||
|
# spdylay is going to be built under third-party/spdylay
|
||||||
|
- cd third-party
|
||||||
|
- git clone https://github.com/tatsuhiro-t/spdylay.git
|
||||||
|
- cd spdylay
|
||||||
|
- autoreconf -i
|
||||||
|
- ./configure --disable-src --disable-examples
|
||||||
|
- make check
|
||||||
|
- export SPDYLAY_HOME=$PWD
|
||||||
|
- cd ../..
|
||||||
|
# Now build nghttp2
|
||||||
- autoreconf -i
|
- autoreconf -i
|
||||||
- automake
|
|
||||||
- autoconf
|
|
||||||
- git submodule update --init
|
- git submodule update --init
|
||||||
- ./configure --enable-werror --with-mruby
|
- ./configure --enable-werror --with-mruby --with-neverbleed LIBSPDYLAY_CFLAGS="-I$SPDYLAY_HOME/lib/includes" LIBSPDYLAY_LIBS="-L$SPDYLAY_HOME/lib/.libs -lspdylay"
|
||||||
script:
|
script:
|
||||||
- make
|
- make
|
||||||
- make check
|
- make check
|
||||||
|
- cd integration-tests
|
||||||
|
- export GOPATH="$PWD/integration-tests/golang"
|
||||||
|
- make itprep-local
|
||||||
|
- make it-local
|
||||||
|
|
|
@ -742,10 +742,19 @@ int Client::connection_made() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
duration = config.timings[reqidx];
|
duration = config.timings[reqidx];
|
||||||
|
if (reqidx == 0) {
|
||||||
|
// if reqidx wraps around back to 0, we uses up all lines and
|
||||||
|
// should break
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
request_timeout_watcher.repeat = duration;
|
if (duration >= 1e-9) {
|
||||||
ev_timer_again(worker->loop, &request_timeout_watcher);
|
// double check since we may have break due to reqidx wraps
|
||||||
|
// around back to 0
|
||||||
|
request_timeout_watcher.repeat = duration;
|
||||||
|
ev_timer_again(worker->loop, &request_timeout_watcher);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
signal_write();
|
signal_write();
|
||||||
|
|
||||||
|
|
|
@ -67,14 +67,8 @@ Http2DownstreamConnection::~Http2DownstreamConnection() {
|
||||||
error_code = NGHTTP2_INTERNAL_ERROR;
|
error_code = NGHTTP2_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (downstream_->get_downstream_stream_id() != -1) {
|
if (http2session_->get_state() == Http2Session::CONNECTED &&
|
||||||
if (LOG_ENABLED(INFO)) {
|
downstream_->get_downstream_stream_id() != -1) {
|
||||||
DCLOG(INFO, this) << "Submit RST_STREAM for DOWNSTREAM:" << downstream_
|
|
||||||
<< ", stream_id="
|
|
||||||
<< downstream_->get_downstream_stream_id()
|
|
||||||
<< ", error_code=" << error_code;
|
|
||||||
}
|
|
||||||
|
|
||||||
submit_rst_stream(downstream_, error_code);
|
submit_rst_stream(downstream_, error_code);
|
||||||
|
|
||||||
http2session_->consume(downstream_->get_downstream_stream_id(),
|
http2session_->consume(downstream_->get_downstream_stream_id(),
|
||||||
|
@ -143,7 +137,8 @@ int Http2DownstreamConnection::submit_rst_stream(Downstream *downstream,
|
||||||
if (LOG_ENABLED(INFO)) {
|
if (LOG_ENABLED(INFO)) {
|
||||||
DCLOG(INFO, this) << "Submit RST_STREAM for DOWNSTREAM:" << downstream
|
DCLOG(INFO, this) << "Submit RST_STREAM for DOWNSTREAM:" << downstream
|
||||||
<< ", stream_id="
|
<< ", stream_id="
|
||||||
<< downstream->get_downstream_stream_id();
|
<< downstream->get_downstream_stream_id()
|
||||||
|
<< ", error_code=" << error_code;
|
||||||
}
|
}
|
||||||
rv = http2session_->submit_rst_stream(
|
rv = http2session_->submit_rst_stream(
|
||||||
downstream->get_downstream_stream_id(), error_code);
|
downstream->get_downstream_stream_id(), error_code);
|
||||||
|
|
Loading…
Reference in New Issue