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:410–426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

408};
409
410static bool host_http_stop_join_free(host_state_t *host) {
411 const host_http_ops_t *ops = host->http_ops;
412 if (host->http && host->http_started) {
413 ops->server_stop(ops->context, host->http);
414 }
415 if (host->http_started) {
416 if (ops->thread_join(ops->context, &host->http_thread) != 0) {
417 return false;
418 }
419 host->http_started = false;
420 }
421 if (!ops->server_free(ops->context, host->http)) {
422 return false;
423 }
424 host->http = NULL;
425 return true;
426}
427
428static uint64_t host_deadline_from(uint64_t now_ms, uint32_t delay_ms) {
429 return now_ms > UINT64_MAX - delay_ms ? UINT64_MAX : now_ms + delay_ms;

Calls

no outgoing calls

Tested by

no test coverage detected