mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-20 06:01:16 +00:00
Keep an offline Moonraker printer from freezing startup (#16668)
Moonraker discovery asked the printer for its name before announcing it, on the GUI thread, with a 5 s connect timeout. When the selected printer was off, the window ignored input for 5 s after every launch and the Home page stayed white. The request never produced a name. It read machine_name or hostname from /server/info, and Moonraker sends neither there. Discovery now announces the preset model name without asking the printer.
This commit is contained in:
1 parent
0585836550
commit
a2b1a2f3e7
2 files changed
+5
-12
No files matched your search
@@ -420,12 +420,13 @@ TEST_CASE("Moonraker discovery waits for a complete device identity", "[Moonrake
|
||||
agent.device_info.dev_id = "127.0.0.1:7125";
|
||||
agent.device_info.dev_ip = agent.device_info.dev_id;
|
||||
agent.device_info.base_url = "http://127.0.0.1:7125";
|
||||
agent.device_info.model_name = "Test model";
|
||||
agent.start_discovery(true, false);
|
||||
REQUIRE(announcements == 1);
|
||||
REQUIRE(agent.fetch_count == 1);
|
||||
REQUIRE(agent.fetch_count == 0);
|
||||
REQUIRE(announcement.at("dev_id") == agent.device_info.dev_id);
|
||||
REQUIRE(announcement.at("dev_ip") == agent.device_info.dev_ip);
|
||||
REQUIRE(announcement.at("dev_name") == "Test printer");
|
||||
REQUIRE(announcement.at("dev_name") == "Test model");
|
||||
}
|
||||
|
||||
TEST_CASE("Stopping the status stream gives a silent printer no more than its timeouts", "[MoonrakerPrinterAgent][StatusStream]")
|
||||
|
||||
Reference in new issue
Block a user