[PR #2362] [CLOSED] tools: poll the server address the config binds, not loopback (#2330) #4005

Closed
opened 2026-11-07 15:32:24 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/2362
Author: @nekomario28
Created: 10/14/2026
Status: ❌ Closed

Base: main ← Head: bench-connect-configured-host


📝 Commits (1)

  • 490cd54 tools: poll the server address the config binds, not loopback (#2330)

📊 Changes

2 files changed (+50 additions, -2 deletions)

View changed files

📝 tools/strata_bench.py (+11 -2)
➕ tools/test_bench_host.py (+39 -0)

📄 Description

Closes #2330.

strata_bench.py starts the server on the config's host and then polls readiness at a hardcoded http://127.0.0.1:<port> (tools/strata_bench.py:967), so a host bound to a specific interface never answers the poll — the report saw the log confirm readiness at 192.168.1.10 while BENCH kept printing "still loading" for 11 minutes.

The change is @Swallowtail23's patch from the report, with the mapping lifted into server_base so the test can reach it and nothing else altered: use the configured host, default to loopback when there is none, map the wildcard binds (0.0.0.0 → 127.0.0.1, :: → ::1) to something connectable, and bracket IPv6 literals. An explicit --url still takes precedence.

Testing

python -m unittest tools.test_bench_host — five cases: a configured LAN host, an absent host, both wildcards, a bare and an already-bracketed IPv6 literal, and a hostname. Replacing the mapping with the old hardcoded 127.0.0.1 fails four of them, so they are guards rather than restatements.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/2362 **Author:** [@nekomario28](https://github.com/nekomario28) **Created:** 10/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `bench-connect-configured-host` --- ### 📝 Commits (1) - [`490cd54`](https://github.com/Niko1221/Strata/commit/490cd546d3735ac14c27e1eb4dbba7997b85ff24) tools: poll the server address the config binds, not loopback (#2330) ### 📊 Changes **2 files changed** (+50 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `tools/strata_bench.py` (+11 -2) ➕ `tools/test_bench_host.py` (+39 -0) </details> ### 📄 Description Closes #2330. `strata_bench.py` starts the server on the config's `host` and then polls readiness at a hardcoded `http://127.0.0.1:<port>` (`tools/strata_bench.py:967`), so a host bound to a specific interface never answers the poll — the report saw the log confirm readiness at `192.168.1.10` while BENCH kept printing "still loading" for 11 minutes. The change is @Swallowtail23's patch from the report, with the mapping lifted into `server_base` so the test can reach it and nothing else altered: use the configured host, default to loopback when there is none, map the wildcard binds (`0.0.0.0` → `127.0.0.1`, `::` → `::1`) to something connectable, and bracket IPv6 literals. An explicit `--url` still takes precedence. ## Testing `python -m unittest tools.test_bench_host` — five cases: a configured LAN host, an absent host, both wildcards, a bare and an already-bracketed IPv6 literal, and a hostname. Replacing the mapping with the old hardcoded `127.0.0.1` fails four of them, so they are guards rather than restatements. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:32:24 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#4005
No description provided.