Skip to content

Commit

Permalink
jsonrpc - Make sure we do not start the rpc server when ats runs on c…
Browse files Browse the repository at this point in the history
…ommand mode.(#11888)
  • Loading branch information
brbzull0 authored Dec 3, 2024
1 parent 0dce0e5 commit b65a841
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
1 change: 0 additions & 1 deletion include/mgmt/rpc/server/IPCSocketServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ class IPCSocketServer : public BaseCommInterface

public:
IPCSocketServer() = default;
virtual ~IPCSocketServer() override;

/// Configure the local socket.
bool configure(YAML::Node const &params) override;
Expand Down
5 changes: 0 additions & 5 deletions src/mgmt/rpc/server/IPCSocketServer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,6 @@ get_peereid(int fd, uid_t *euid, gid_t *egid)

namespace rpc::comm
{
IPCSocketServer::~IPCSocketServer()
{
unlink(_conf.sockPathName.c_str());
}

bool
IPCSocketServer::configure(YAML::Node const &params)
{
Expand Down
8 changes: 5 additions & 3 deletions src/traffic_server/traffic_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1997,9 +1997,11 @@ main(int /* argc ATS_UNUSED */, const char **argv)
extern int gSystemClock; // 0 == CLOCK_REALTIME, the default
REC_ReadConfigInteger(gSystemClock, "proxy.config.system_clock");

// JSONRPC server and handlers
if (auto &&[ok, msg] = initialize_jsonrpc_server(); !ok) {
Warning("JSONRPC server could not be started.\n Why?: '%s' ... Continuing without it.", msg.c_str());
if (!command_flag) { // No need if we are going into command mode.
// JSONRPC server and handlers
if (auto &&[ok, msg] = initialize_jsonrpc_server(); !ok) {
Warning("JSONRPC server could not be started.\n Why?: '%s' ... Continuing without it.", msg.c_str());
}
}

// setup callback for tracking remap included files
Expand Down

0 comments on commit b65a841

Please sign in to comment.