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

Function runtime_reject_inline

src/daemon/runtime.c:2321–2331  ·  view source on GitHub ↗

Answers WITHOUT reading the peer's HELLO, so on POSIX (where the drain is a * no-op) the close can land before the peer has even sent it; the client reads * this answer after its failed send (cbm_daemon_runtime_client_connect). */

Source from the content-addressed store, hash-verified

2319 * no-op) the close can land before the peer has even sent it; the client reads
2320 * this answer after its failed send (cbm_daemon_runtime_client_connect). */
2321static void runtime_reject_inline(cbm_daemon_ipc_connection_t *connection, const char *message) {
2322 cbm_daemon_runtime_connect_result_t result;
2323 runtime_result_rejected(&result, message);
2324 RUNTIME_HELLO_POINT(DAEMON_REJECTING);
2325 (void)runtime_send_hello_response(connection, &result);
2326 /* Same Windows named-pipe discard hazard as runtime_worker_finish: the
2327 * peer must get to read the rejection before the handle closes. */
2328 cbm_daemon_ipc_connection_drain(connection, runtime_reject_drain_timeout_ms());
2329 cbm_daemon_ipc_connection_close(connection);
2330 RUNTIME_HELLO_POINT(DAEMON_REJECTED);
2331}
2332
2333static void runtime_accept_connection(cbm_daemon_runtime_service_t *service,
2334 cbm_daemon_ipc_connection_t *connection) {

Callers 1

Tested by

no test coverage detected