We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0e0e52c commit 386756aCopy full SHA for 386756a
cli/daemon/daemon.go
@@ -73,15 +73,14 @@ func runDaemonCommand(cmd *cobra.Command, args []string) {
73
defer stats.Flush()
74
}
75
port := configuration.Settings.GetString("daemon.port")
76
- var s *grpc.Server
+ gRPCOptions := []grpc.ServerOption{}
77
if debug {
78
- s = grpc.NewServer(
+ gRPCOptions = append(gRPCOptions,
79
grpc.UnaryInterceptor(unaryLoggerInterceptor),
80
grpc.StreamInterceptor(streamLoggerInterceptor),
81
)
82
- } else {
83
- s = grpc.NewServer()
84
+ s := grpc.NewServer(gRPCOptions...)
85
// Set specific user-agent for the daemon
86
configuration.Settings.Set("network.user_agent_ext", "daemon")
87
0 commit comments