]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
crimson/net: dispatch events in SocketConnection
authorYingxin <yingxin.cheng@intel.com>
Wed, 21 Nov 2018 20:39:37 +0000 (04:39 +0800)
committerYingxin <yingxin.cheng@intel.com>
Thu, 20 Dec 2018 19:08:55 +0000 (03:08 +0800)
commit0142e5440dc1e3e6370f61747881f04edee730b8
tree88f5390b639b460d562259ee1d1291e06e2c4d81
parent3a2b0906232c3199cb817226fcf71974c65b7118
crimson/net: dispatch events in SocketConnection

* move dispatch(), and exception handling logics in accept() and
  connect() from SocketMessenger into SocketConnection, so we can manage
  the state transition in the same class and at the same abstraction
  level.
* gate the dangling futures in SocketConnection, because the
  connection's smart_ptr won't be hold by messenger any more during
  exception handling.
* don't return close() inside SocketConnection to prevent recursive
  gating -- dead lock.

Signed-off-by: Yingxin <yingxin.cheng@intel.com>
src/crimson/net/SocketConnection.cc
src/crimson/net/SocketConnection.h
src/crimson/net/SocketMessenger.cc
src/crimson/net/SocketMessenger.h