| 104 | } |
| 105 | |
| 106 | void ProtocolV1::stop() { |
| 107 | ldout(cct, 20) << __func__ << dendl; |
| 108 | if (state == CLOSED) { |
| 109 | return; |
| 110 | } |
| 111 | |
| 112 | if (connection->delay_state) connection->delay_state->flush(); |
| 113 | |
| 114 | ldout(cct, 2) << __func__ << dendl; |
| 115 | std::lock_guard<std::mutex> l(connection->write_lock); |
| 116 | |
| 117 | reset_recv_state(); |
| 118 | discard_out_queue(); |
| 119 | |
| 120 | connection->_stop(); |
| 121 | |
| 122 | can_write = WriteStatus::CLOSED; |
| 123 | state = CLOSED; |
| 124 | } |
| 125 | |
| 126 | void ProtocolV1::fault() { |
| 127 | ldout(cct, 20) << __func__ << dendl; |