mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-10-02 02:47:26 -05: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:
@@ -240,7 +240,9 @@ void server_connect::stop() {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
}
|
||||
|
||||
// no-op if the child already exited; also unblocks the log thread by closing its stdout
|
||||
// no-op if the child already exited. the log thread leaves fgets() on EOF, which the kernel
|
||||
// raises once every writer of the stdout pipe is gone, so llama-connect must not spawn
|
||||
// children of its own: one of them holding that pipe blocks the join below forever
|
||||
proc->terminate();
|
||||
|
||||
if (log_thread.joinable()) {
|
||||
|
||||
Reference in New Issue
Block a user