Skip to content

Commit

Permalink
nghttpx: Set do_signal_write_ when TLS handshake was completed
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsuhiro-t committed Aug 23, 2016
1 parent d9139fc commit 8f47b68
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/shrpx_http_downstream_connection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -1160,15 +1162,15 @@ 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;

return 0;
}

do_signal_write_ = &HttpDownstreamConnection::actual_signal_write;

connect_blocker->on_success();

ev_set_cb(&conn_.rt, timeoutcb);
Expand Down

0 comments on commit 8f47b68

Please sign in to comment.