feat: opt-in heartbeat liveness detection with fail-fast connection errors #4
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/heartbeat"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
--heartbeat,--heartbeat-interval,--heartbeat-timeout): idle connections get an MCP ping, a missed pong drops into the normal reconnect path. Ping responses are never forwarded to stdout.initialize, flushes buffered stdin, honors--max-disconnected-time/--initial-retry-interval.Why
With bad/missing credentials the bridge logged
connected, gotForbiddenon theinitializewrite, then retried forever without ever answering the client, so mcp-cli timed out and appeared hung (reproduced against the pit endpoint). Failures now surface immediately on stderr with a clear message; post-connect transient drops still retry as before.Verification
go build ./...,go vet ./...,golangci-lint run(0 issues),go test ./...all pass. Verified live via mcp-cli against the pit endpoint:whoamireturns the client identity.