diff options
Diffstat (limited to 'src/shrpx_live_check.cc')
-rw-r--r-- | src/shrpx_live_check.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/shrpx_live_check.cc b/src/shrpx_live_check.cc index 9b932cd..8e8d316 100644 --- a/src/shrpx_live_check.cc +++ b/src/shrpx_live_check.cc @@ -580,18 +580,16 @@ int LiveCheck::write_clear() { } int LiveCheck::on_read(const uint8_t *data, size_t len) { - ssize_t rv; - - rv = nghttp2_session_mem_recv(session_, data, len); + auto rv = nghttp2_session_mem_recv2(session_, data, len); if (rv < 0) { - LOG(ERROR) << "nghttp2_session_mem_recv() returned error: " + LOG(ERROR) << "nghttp2_session_mem_recv2() returned error: " << nghttp2_strerror(rv); return -1; } if (settings_ack_received_ && !session_closing_) { session_closing_ = true; - rv = nghttp2_session_terminate_session(session_, NGHTTP2_NO_ERROR); + auto rv = nghttp2_session_terminate_session(session_, NGHTTP2_NO_ERROR); if (rv != 0) { return -1; } @@ -619,10 +617,10 @@ int LiveCheck::on_read(const uint8_t *data, size_t len) { int LiveCheck::on_write() { for (;;) { const uint8_t *data; - auto datalen = nghttp2_session_mem_send(session_, &data); + auto datalen = nghttp2_session_mem_send2(session_, &data); if (datalen < 0) { - LOG(ERROR) << "nghttp2_session_mem_send() returned error: " + LOG(ERROR) << "nghttp2_session_mem_send2() returned error: " << nghttp2_strerror(datalen); return -1; } |