| 630 | } |
| 631 | |
| 632 | void AsyncConnection::_stop() { |
| 633 | writeCallback = {}; |
| 634 | dispatch_queue->discard_queue(conn_id); |
| 635 | async_msgr->unregister_conn(this); |
| 636 | worker->release_worker(); |
| 637 | |
| 638 | state = STATE_CLOSED; |
| 639 | open_write = false; |
| 640 | |
| 641 | state_offset = 0; |
| 642 | // Make sure in-queue events will been processed |
| 643 | center->dispatch_event_external(EventCallbackRef(new C_clean_handler(this))); |
| 644 | } |
| 645 | |
| 646 | bool AsyncConnection::is_queued() const { |
| 647 | return outgoing_bl.length(); |
no test coverage detected