nghttpd: Start SETTINGS timer after it is written to output buffer
This commit is contained in:
parent
3e72711e23
commit
9d15f9b00d
|
@ -577,6 +577,10 @@ Http2Handler::WriteBuf *Http2Handler::get_wb() { return &wb_; }
|
||||||
|
|
||||||
int Http2Handler::setup_bev() { return 0; }
|
int Http2Handler::setup_bev() { return 0; }
|
||||||
|
|
||||||
|
void Http2Handler::start_settings_timer() {
|
||||||
|
ev_timer_start(sessions_->get_loop(), &settings_timerev_);
|
||||||
|
}
|
||||||
|
|
||||||
int Http2Handler::fill_wb() {
|
int Http2Handler::fill_wb() {
|
||||||
if (data_pending_) {
|
if (data_pending_) {
|
||||||
auto n = std::min(wb_.wleft(), data_pendinglen_);
|
auto n = std::min(wb_.wleft(), data_pendinglen_);
|
||||||
|
@ -870,8 +874,6 @@ int Http2Handler::connection_made() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ev_timer_start(sessions_->get_loop(), &settings_timerev_);
|
|
||||||
|
|
||||||
if (ssl_ && !nghttp2::ssl::check_http2_requirement(ssl_)) {
|
if (ssl_ && !nghttp2::ssl::check_http2_requirement(ssl_)) {
|
||||||
terminate_session(NGHTTP2_INADEQUATE_SECURITY);
|
terminate_session(NGHTTP2_INADEQUATE_SECURITY);
|
||||||
}
|
}
|
||||||
|
@ -1538,6 +1540,15 @@ int hd_on_frame_send_callback(nghttp2_session *session,
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case NGHTTP2_SETTINGS: {
|
||||||
|
if (frame->hd.flags & NGHTTP2_FLAG_ACK) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
hd->start_settings_timer();
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
case NGHTTP2_PUSH_PROMISE: {
|
case NGHTTP2_PUSH_PROMISE: {
|
||||||
auto promised_stream_id = frame->push_promise.promised_stream_id;
|
auto promised_stream_id = frame->push_promise.promised_stream_id;
|
||||||
auto promised_stream = hd->get_stream(promised_stream_id);
|
auto promised_stream = hd->get_stream(promised_stream_id);
|
||||||
|
|
|
@ -138,6 +138,7 @@ public:
|
||||||
|
|
||||||
void remove_self();
|
void remove_self();
|
||||||
int setup_bev();
|
int setup_bev();
|
||||||
|
void start_settings_timer();
|
||||||
int on_read();
|
int on_read();
|
||||||
int on_write();
|
int on_write();
|
||||||
int connection_made();
|
int connection_made();
|
||||||
|
|
Loading…
Reference in New Issue