nghttpx: Set do_signal_write_ when TLS handshake was completed

This commit is contained in:
Tatsuhiro Tsujikawa 2016-08-23 21:36:43 +09:00
parent d9139fc286
commit 8f47b68a95
1 changed files with 4 additions and 2 deletions

View File

@ -994,6 +994,8 @@ int HttpDownstreamConnection::tls_handshake() {
auto &connect_blocker = addr_->connect_blocker;
do_signal_write_ = &HttpDownstreamConnection::actual_signal_write;
connect_blocker->on_success();
ev_set_cb(&conn_.rt, timeoutcb);
@ -1160,8 +1162,6 @@ int HttpDownstreamConnection::connected() {
ev_set_cb(&conn_.wev, writecb);
do_signal_write_ = &HttpDownstreamConnection::actual_signal_write;
if (conn_.tls.ssl) {
do_read_ = &HttpDownstreamConnection::tls_handshake;
do_write_ = &HttpDownstreamConnection::tls_handshake;
@ -1169,6 +1169,8 @@ int HttpDownstreamConnection::connected() {
return 0;
}
do_signal_write_ = &HttpDownstreamConnection::actual_signal_write;
connect_blocker->on_success();
ev_set_cb(&conn_.rt, timeoutcb);