MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / host_http_stop_join_free

Function host_http_stop_join_free

src/daemon/host.c:397–413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

395};
396
397static bool host_http_stop_join_free(host_state_t *host) {
398 const host_http_ops_t *ops = host->http_ops;
399 if (host->http && host->http_started) {
400 ops->server_stop(ops->context, host->http);
401 }
402 if (host->http_started) {
403 if (ops->thread_join(ops->context, &host->http_thread) != 0) {
404 return false;
405 }
406 host->http_started = false;
407 }
408 if (!ops->server_free(ops->context, host->http)) {
409 return false;
410 }
411 host->http = NULL;
412 return true;
413}
414
415static uint64_t host_deadline_from(uint64_t now_ms, uint32_t delay_ms) {
416 return now_ms > UINT64_MAX - delay_ms ? UINT64_MAX : now_ms + delay_ms;

Calls

no outgoing calls

Tested by

no test coverage detected