SequenceDispatcher: bugfix

GitOrigin-RevId: b02782f0a4247d5b6d3a1fc77d73deb240c80ad6
This commit is contained in:
Arseny Smirnov 2018-02-27 11:48:16 +03:00
parent 70ad2664bd
commit c91edb6163

View File

@ -147,6 +147,9 @@ void SequenceDispatcher::on_result(NetQueryPtr query) {
void SequenceDispatcher::loop() {
for (; finish_i_ < data_.size() && data_[finish_i_].state_ == State::Finish; finish_i_++) {
}
if (next_i_ < finish_i_) {
next_i_ = finish_i_;
}
for (; next_i_ < data_.size() && data_[next_i_].state_ != State::Wait && wait_cnt_ < MAX_SIMULTANEOUS_WAIT;
next_i_++) {
if (data_[next_i_].state_ == State::Finish) {