mirror of
https://github.com/moparisthebest/spdylay
synced 2024-12-22 07:38:52 -05:00
shrpx: Check spdylay_session_want_{read,write}
This commit is contained in:
parent
4bc200f9dc
commit
75f93d8333
@ -339,6 +339,15 @@ int SpdyUpstream::on_read()
|
||||
LOG(ERROR) << "spdylay_session_send() returned error: "
|
||||
<< 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;
|
||||
}
|
||||
|
||||
@ -355,6 +364,15 @@ int SpdyUpstream::send()
|
||||
LOG(ERROR) << "spdylay_session_send() returned error: "
|
||||
<< 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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user