Merge branch 'nghttpx-fix-libev-assertion-error'
This commit is contained in:
commit
528af200b6
|
@ -83,13 +83,16 @@ void RateLimit::regen() {
|
||||||
avail_ += rate_;
|
avail_ += rate_;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (avail_ > 0 && startw_req_) {
|
if (w_->fd >= 0 && avail_ > 0 && startw_req_) {
|
||||||
ev_io_start(loop_, w_);
|
ev_io_start(loop_, w_);
|
||||||
handle_tls_pending_read();
|
handle_tls_pending_read();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RateLimit::startw() {
|
void RateLimit::startw() {
|
||||||
|
if (w_->fd < 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
startw_req_ = true;
|
startw_req_ = true;
|
||||||
if (rate_ == 0 || avail_ > 0) {
|
if (rate_ == 0 || avail_ > 0) {
|
||||||
ev_io_start(loop_, w_);
|
ev_io_start(loop_, w_);
|
||||||
|
|
Loading…
Reference in New Issue