all the refactor
Build and Publish / BuildAndDeployAmd64 (push) Failing after 5s
Build and Publish / BuildAndDeployArm64 (push) Failing after 6s

This commit is contained in:
2026-06-28 17:51:52 +02:00
parent 7db0d236c7
commit aa8b2bdedc
84 changed files with 4328 additions and 2344 deletions
+6 -1
View File
@@ -284,9 +284,14 @@ func NewControlServer[V any](config ServerConfig, pool GrainPool[V]) (*grpc.Serv
reflection.Register(grpcServer)
log.Printf("gRPC server listening as %s on %s", pool.Hostname(), config.Addr)
// Serve runs in a goroutine because it blocks until the listener is closed.
// On Serve error we log it instead of crashing the whole process from deep
// inside this package — the caller (composition root) should rely on
// process supervision (Kubernetes) to restart, or check gRPC health via the
// pool after this returns.
go func() {
if err := grpcServer.Serve(lis); err != nil {
log.Fatalf("failed to serve gRPC: %v", err)
log.Printf("gRPC server %s serve error: %v", config.Addr, err)
}
}()