mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-04 02:31:14 +00:00
Fail gracefully on grpc listening error (#4118)
This commit is contained in:
@@ -33,7 +33,7 @@ import (
|
|||||||
func runGrpcServer(ctx context.Context, c *cli.Command, _store store.Store) error {
|
func runGrpcServer(ctx context.Context, c *cli.Command, _store store.Store) error {
|
||||||
lis, err := net.Listen("tcp", c.String("grpc-addr"))
|
lis, err := net.Listen("tcp", c.String("grpc-addr"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal().Err(err).Msg("failed to listen on grpc-addr") //nolint:forbidigo
|
return fmt.Errorf("failed to listen on grpc-addr: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
jwtSecret := c.String("grpc-secret")
|
jwtSecret := c.String("grpc-secret")
|
||||||
|
Reference in New Issue
Block a user