mirror of
https://github.com/ceph/ceph
synced 2025-01-19 17:41:39 +00:00
Merge pull request #9397 from xiexingguo/xxg-wip-fixsocketfd-leak
common/admin_socket: fix socket fd leak Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
commit
2fd1390f48
@ -322,7 +322,7 @@ bool AdminSocket::do_accept()
|
||||
if (ret <= 0) {
|
||||
lderr(m_cct) << "AdminSocket: error reading request code: "
|
||||
<< cpp_strerror(ret) << dendl;
|
||||
close(connection_fd);
|
||||
VOID_TEMP_FAILURE_RETRY(close(connection_fd));
|
||||
return false;
|
||||
}
|
||||
//ldout(m_cct, 0) << "AdminSocket read byte " << (int)cmd[pos] << " pos " << pos << dendl;
|
||||
@ -365,6 +365,7 @@ bool AdminSocket::do_accept()
|
||||
cmdvec.push_back(cmd);
|
||||
if (!cmdmap_from_json(cmdvec, &cmdmap, errss)) {
|
||||
ldout(m_cct, 0) << "AdminSocket: " << errss.rdbuf() << dendl;
|
||||
VOID_TEMP_FAILURE_RETRY(close(connection_fd));
|
||||
return false;
|
||||
}
|
||||
cmd_getval(m_cct, cmdmap, "format", format);
|
||||
|
Loading…
Reference in New Issue
Block a user