nghttpx: Set timeout to underlying bufferevent
Setting write timeout to filter bufferevent does not work as intended. It timeouts even when there is no data to write.
This commit is contained in:
parent
4f7223e89f
commit
7e5567341f
|
@ -361,7 +361,13 @@ void ClientHandler::set_bev_cb
|
|||
void ClientHandler::set_upstream_timeouts(const timeval *read_timeout,
|
||||
const timeval *write_timeout)
|
||||
{
|
||||
bufferevent_set_timeouts(bev_, read_timeout, write_timeout);
|
||||
auto bev = bufferevent_get_underlying(bev_);
|
||||
|
||||
if(!bev) {
|
||||
bev = bev_;
|
||||
}
|
||||
|
||||
bufferevent_set_timeouts(bev, read_timeout, write_timeout);
|
||||
}
|
||||
|
||||
int ClientHandler::validate_next_proto()
|
||||
|
|
Loading…
Reference in New Issue