Commit 75f93d83 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

shrpx: Check spdylay_session_want_{read,write}

parent 4bc200f9
...@@ -339,6 +339,15 @@ int SpdyUpstream::on_read() ...@@ -339,6 +339,15 @@ int SpdyUpstream::on_read()
LOG(ERROR) << "spdylay_session_send() returned error: " LOG(ERROR) << "spdylay_session_send() returned error: "
<< spdylay_strerror(rv); << spdylay_strerror(rv);
} }
if(rv == 0) {
if(spdylay_session_want_read(session_) == 0 &&
spdylay_session_want_write(session_) == 0) {
if(ENABLE_LOG) {
LOG(INFO) << "No more read/write for this SPDY session";
}
rv = -1;
}
}
return rv; return rv;
} }
...@@ -355,6 +364,15 @@ int SpdyUpstream::send() ...@@ -355,6 +364,15 @@ int SpdyUpstream::send()
LOG(ERROR) << "spdylay_session_send() returned error: " LOG(ERROR) << "spdylay_session_send() returned error: "
<< spdylay_strerror(rv); << spdylay_strerror(rv);
} }
if(rv == 0) {
if(spdylay_session_want_read(session_) == 0 &&
spdylay_session_want_write(session_) == 0) {
if(ENABLE_LOG) {
LOG(INFO) << "No more read/write for this SPDY session";
}
rv = -1;
}
}
return rv; return rv;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment