msgr: increment connect_seq when STANDBY->CONNECTING

Otherwise we get this on the peer:

msg/SimpleMessenger.cc: In function 'int SimpleMessenger::Pipe::accept()':
msg/SimpleMessenger.cc:767: FAILED assert(existing->state == STATE_CONNECTING)
 1: (SimpleMessenger::Pipe::accept()+0x14b2) [0x654888]
 2: (SimpleMessenger::Pipe::reader()+0x32) [0x65538c]
 3: (SimpleMessenger::Pipe::Reader::entry()+0x19) [0x649493]
 4: (Thread::_entry_func(void*)+0x20) [0x659b06]
 5: /lib/libpthread.so.0 [0x7fcdc782f73a]
 6: (clone()+0x6d) [0x7fcdc6a5969d]
 NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.
This commit is contained in:
Sage Weil 2010-04-22 07:37:13 -07:00
parent 629853516e
commit 0fc47e267b

View File

@ -1554,8 +1554,10 @@ void SimpleMessenger::Pipe::writer()
dout(10) << "writer: state = " << state << " policy.server=" << policy.server << dendl;
// standby?
if (is_queued() && state == STATE_STANDBY && !policy.server)
if (is_queued() && state == STATE_STANDBY && !policy.server) {
connect_seq++;
state = STATE_CONNECTING;
}
// connect?
if (state == STATE_CONNECTING) {