mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-09-11 04:56:56 +02:00
server: do not advertise a connect code without the tunnel
--connect-code on its own had no effect other than being served in /props, so the Web UI showed a remote access code that no tunnel was serving. Clear it when --connect is off, and say so once at startup. The teardown comment claimed that terminate() closes the child stdout. It does not: the log thread leaves fgets() only once every writer of that pipe is gone, so a descendant of llama-connect would block the join forever. Describe the real contract instead. Also restore the --reasoning-preserve default in the generated docs.
This commit is contained in:
@@ -184,6 +184,10 @@ int llama_server(common_params & params, int argc, char ** argv) {
|
||||
return 1;
|
||||
}
|
||||
params.server_connect_code = server_connect::resolve_code(params.server_connect_code);
|
||||
} else if (!params.server_connect_code.empty()) {
|
||||
// the code is only meaningful while the tunnel runs, and /props keys off it being set
|
||||
SRV_WRN("%s", "--connect-code is ignored without --connect\n");
|
||||
params.server_connect_code.clear();
|
||||
}
|
||||
|
||||
// note: this is guaranteed to out-live ctx_http and tools
|
||||
|
||||
Reference in New Issue
Block a user