From: John Spray Date: Thu, 4 Aug 2016 14:04:17 +0000 (+0100) Subject: mgr: dispose of connections after handle_command X-Git-Tag: v11.0.1~60^2~24 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0812669cf2a7247f9d056ff3aae831c95cce50b1;p=ceph.git mgr: dispose of connections after handle_command ...to avoid leaking them and eventually running out of fds. Signed-off-by: John Spray --- diff --git a/src/mgr/DaemonServer.cc b/src/mgr/DaemonServer.cc index cddbf0a69fb4..8ba6f904665c 100644 --- a/src/mgr/DaemonServer.cc +++ b/src/mgr/DaemonServer.cc @@ -305,6 +305,12 @@ bool DaemonServer::handle_command(MCommand *m) } out: + + // Let the connection drop as soon as we've sent our response + if (m->get_connection()) { + m->get_connection()->mark_disposable(); + } + std::string rs; rs = ss.str(); odata.append(ds);