From ae6247af8000c2ef914f43e1f3cefdf3035b7115 Mon Sep 17 00:00:00 2001 From: Haomai Wang Date: Thu, 30 Apr 2015 11:44:16 +0800 Subject: [PATCH] AsyncConnection: Fix connection doesn't exchange in_seq problem 1. osd.a connect to osd.b and osd.b try to connect a 2. osd.b got WAIT then osd.b accpet connection from osd.a 2. osd.b inject error cause each side connection try to reconnect, connect_seq++ 3. osd.a try to reconnect 4. osd.b connect to osd.a and cause the new accept connection try to replace 5. osd.b's is_reset_from_peer=true 6. inject error to osd.b 7. osd.b connect to osd.a 8. successfully and is_reset_from_peer still is true 9. long time passed 10. error happen and osd.a connect to osd.b 11. because is_reset_from_peer is true, they don't exchange in_seq Signed-off-by: Haomai Wang --- src/msg/async/AsyncConnection.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/msg/async/AsyncConnection.cc b/src/msg/async/AsyncConnection.cc index 4c72ae547aff9..a401a8b51af52 100644 --- a/src/msg/async/AsyncConnection.cc +++ b/src/msg/async/AsyncConnection.cc @@ -2043,6 +2043,7 @@ void AsyncConnection::fault() recv_start = recv_end = 0; state_offset = 0; replacing = false; + is_reset_from_peer = false; outcoming_bl.clear(); if (!once_ready && !is_queued() && state >=STATE_ACCEPTING && state <= STATE_ACCEPTING_WAIT_CONNECT_MSG_AUTH) { -- 2.39.5