h2load: Check return of nghttp2_submit_request

This commit is contained in:
Tatsuhiro Tsujikawa 2014-04-25 21:23:31 +09:00
parent cb6a3cf4e7
commit d84d0b8c5c
1 changed files with 4 additions and 2 deletions

View File

@ -149,6 +149,7 @@ void Http2Session::on_connect()
void Http2Session::submit_request()
{
int rv;
auto config = client_->worker->config;
auto& nva = config->nva[client_->reqidx++];
@ -156,8 +157,9 @@ void Http2Session::submit_request()
client_->reqidx = 0;
}
nghttp2_submit_request(session_, nullptr, nva.data(), nva.size(),
rv = nghttp2_submit_request(session_, nullptr, nva.data(), nva.size(),
nullptr, nullptr);
assert(rv == 0);
}
ssize_t Http2Session::on_read()