diff --git a/server/php-engine.cpp b/server/php-engine.cpp index bebf348866..b94d81db15 100644 --- a/server/php-engine.cpp +++ b/server/php-engine.cpp @@ -2085,7 +2085,7 @@ int main_args_handler(int i, const char *long_option) { } auto host = std::string(optarg, colon - optarg); auto port = atoi(colon + 1); - if (host.empty()) { + if (host.empty() || host == "localhost") { host = "127.0.0.1"; } diff --git a/tests/python/tests/stats/test_statshouse_smoke.py b/tests/python/tests/stats/test_statshouse_smoke.py index 489f7af59b..a98bb414be 100644 --- a/tests/python/tests/stats/test_statshouse_smoke.py +++ b/tests/python/tests/stats/test_statshouse_smoke.py @@ -13,7 +13,7 @@ def extra_class_setup(cls): cls.statshouse.start() cls.kphp_server.update_options({ "--workers-num": cls.WORKERS_NUM, - "--statshouse-client": ":" + str(cls.statshouse.port), + "--statshouse-client": "localhost:" + str(cls.statshouse.port), }) @classmethod