nghttpx: Update last_write_time_ after SSL_write

SSL_write may return error indicating blocking until all given data
are written.  Because of this, it is preferable to update
last_write_time_ after SSL_write regardless of its return value.
This commit is contained in:
Tatsuhiro Tsujikawa 2015-01-22 21:14:16 +09:00
parent ac1cc56fbb
commit 76a97b9718
1 changed files with 2 additions and 1 deletions

View File

@ -327,6 +327,8 @@ int ClientHandler::write_tls() {
return -1;
}
update_last_write_time();
if (rv < 0) {
auto err = SSL_get_error(ssl_, rv);
switch (err) {
@ -352,7 +354,6 @@ int ClientHandler::write_tls() {
wlimit_.drain(rv);
update_warmup_writelen(rv);
update_last_write_time();
continue;
}