]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/MgrClient: use unique_ptr for MgrClient::session
authorKefu Chai <kchai@redhat.com>
Tue, 28 Feb 2017 05:42:58 +0000 (05:42 +0000)
committerKefu Chai <kchai@redhat.com>
Tue, 28 Feb 2017 06:58:11 +0000 (14:58 +0800)
commit4d1989dc229a7f0a5f83ff1faf9d766c20ab73a8
tree99ce545a14ec8234c77988d8fb4ed088421660d0
parentae85309b8d0ab2185ac5ef48692230f649cb0b6d
mgr/MgrClient: use unique_ptr for MgrClient::session

* use unique_ptr<MgrSessionState> for MgrClient::session, so we don't leak it.
* also reset it in MgrClient::shutdown(), so the connection held by session can
  be released properly, and hence the MonClient will not be asked for
  an AuthAuthorizer after being shut down.

Fixes: http://tracker.ceph.com/issues/19097
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mgr/MgrClient.cc
src/mgr/MgrClient.h