]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
AsyncConnection: Don't increment connect_seq if connect failed
authorHaomai Wang <haomaiwang@gmail.com>
Wed, 14 Jan 2015 14:51:58 +0000 (22:51 +0800)
committerHaomai Wang <haomaiwang@gmail.com>
Thu, 15 Jan 2015 19:07:13 +0000 (03:07 +0800)
commitf7f25b4cbb148ba157fc84d9c37d45baefd0156a
tree73d9604cc3b2c5cc9bc5558f87e25c36cdc7b61b
parent898d43dbee821d084ab7aa3700774f0507a0520b
AsyncConnection: Don't increment connect_seq if connect failed

If connection sent many messages without acked, then it was marked down.
Next we get a new connection, it will issue a connect_msg with connect_seq=0,
server side need to detect "connect_seq==0 && existing->connect_seq >0",
so it will reset out_q and detect remote reset. But if client side failed
before sending connect_msg, now it will issue a connect_msg with non-zero
connect_seq which will cause server-side can't detect exist remote reset.
Server-side will reply a non-zero in_seq and cause client crash.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
src/msg/async/AsyncConnection.cc