mirror of
https://github.com/ceph/ceph
synced 2025-02-25 03:52:04 +00:00
msgr: use discard_queue, kill drop_msgs
This commit is contained in:
parent
4a644e246e
commit
ae4e9784fb
@ -1174,8 +1174,8 @@ void SimpleMessenger::Pipe::fail()
|
||||
|
||||
stop();
|
||||
|
||||
drop_msgs();
|
||||
|
||||
discard_queue();
|
||||
|
||||
for (unsigned i=0; i<rank->local.size(); i++)
|
||||
if (rank->local[i])
|
||||
rank->local[i]->queue_reset(connection_state->get());
|
||||
@ -1186,7 +1186,7 @@ void SimpleMessenger::Pipe::was_session_reset()
|
||||
assert(lock.is_locked());
|
||||
|
||||
dout(10) << "was_session_reset" << dendl;
|
||||
drop_msgs();
|
||||
discard_queue();
|
||||
|
||||
for (unsigned i=0; i<rank->local.size(); i++)
|
||||
if (rank->local[i])
|
||||
@ -1197,18 +1197,6 @@ void SimpleMessenger::Pipe::was_session_reset()
|
||||
connect_seq = 0;
|
||||
}
|
||||
|
||||
void SimpleMessenger::Pipe::drop_msgs()
|
||||
{
|
||||
assert(lock.is_locked());
|
||||
|
||||
while (1) {
|
||||
Message *m = _get_next_outgoing();
|
||||
if (!m)
|
||||
break;
|
||||
m->put();
|
||||
}
|
||||
}
|
||||
|
||||
void SimpleMessenger::Pipe::stop()
|
||||
{
|
||||
dout(10) << "stop" << dendl;
|
||||
|
@ -134,8 +134,6 @@ private:
|
||||
|
||||
void was_session_reset();
|
||||
|
||||
void drop_msgs();
|
||||
|
||||
// threads
|
||||
class Reader : public Thread {
|
||||
Pipe *pipe;
|
||||
|
Loading…
Reference in New Issue
Block a user