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

Source from the content-addressed store, hash-verified

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

Calls

no outgoing calls

Tested by

no test coverage detected