1. A -> B
2. goto standby
3. B mark down
4. A reconnect to B
5. got reset session and dispatch remote reset
6. because remote reset is executed in DispatchQueue, it will be delayed
7. A -> B successfully and begin to send message
8. assert because we found the first message is missing but it's reasonble
if policy.resetcheck is true
Signed-off-by: Haomai Wang <haomai@xsky.com>
}
void ms_handle_fast_connect(Connection *con) {
- lock.Lock();
+ Mutex::Locker l(lock);
+ list<uint64_t> c = conn_sent[con];
+ for (list<uint64_t>::iterator it = c.begin();
+ it != c.end(); ++it)
+ sent.erase(*it);
+ conn_sent.erase(con);
got_connect = true;
cond.Signal();
- lock.Unlock();
}
- void ms_handle_fast_accept(Connection *con) { }
+ void ms_handle_fast_accept(Connection *con) {
+ Mutex::Locker l(lock);
+ list<uint64_t> c = conn_sent[con];
+ for (list<uint64_t>::iterator it = c.begin();
+ it != c.end(); ++it)
+ sent.erase(*it);
+ conn_sent.erase(con);
+ cond.Signal();
+ }
bool ms_dispatch(Message *m) {
assert(0);
}