| 606 | return 0; |
| 607 | } |
| 608 | DEFINE_SMALL_ARRAY(butil::IOBuf*, buf_list, s->_options.messages_in_batch, 256); |
| 609 | MessageBatcher mb(buf_list, s->_options.messages_in_batch, s); |
| 610 | bool has_timeout_task = false; |
| 611 | for (; iter; ++iter) { |
| 612 | butil::IOBuf* t= *iter; |
| 613 | if (t == TIMEOUT_TASK) { |
| 614 | has_timeout_task = true; |
| 615 | } else { |
| 616 | if (s->_parse_rpc_response) { |
| 617 | s->_parse_rpc_response = false; |
| 618 | s->HandleRpcResponse(t); |
| 619 | } else { |
| 620 | mb.push(t); |
| 621 | } |
| 622 | } |
| 623 | } |
| 624 | if (s->_options.handler != NULL) { |
| 625 | if (has_timeout_task && mb.total_length() == 0) { |
| 626 | s->_options.handler->on_idle_timeout(s->id()); |
nothing calls this directly
no test coverage detected