| 662 | } |
| 663 | |
| 664 | void AsyncConnection::DelayedDelivery::do_request(uint64_t id) |
| 665 | { |
| 666 | Message *m = nullptr; |
| 667 | { |
| 668 | std::lock_guard<std::mutex> l(delay_lock); |
| 669 | register_time_events.erase(id); |
| 670 | if (stop_dispatch) |
| 671 | return ; |
| 672 | if (delay_queue.empty()) |
| 673 | return ; |
| 674 | m = delay_queue.front(); |
| 675 | delay_queue.pop_front(); |
| 676 | } |
| 677 | if (msgr->ms_can_fast_dispatch(m)) { |
| 678 | dispatch_queue->fast_dispatch(m); |
| 679 | } else { |
| 680 | dispatch_queue->enqueue(m, m->get_priority(), conn_id); |
| 681 | } |
| 682 | } |
| 683 | |
| 684 | void AsyncConnection::DelayedDelivery::discard() { |
| 685 | stop_dispatch = true; |
nothing calls this directly
no test coverage detected