Skip to content

Commit b5ef187

Browse files
cmagliesilvanocerza
andcommitted
Update cli/daemon/daemon.go
Co-authored-by: Silvano Cerza <[email protected]>
1 parent 0e0e52c commit b5ef187

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

cli/daemon/daemon.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,14 @@ func runDaemonCommand(cmd *cobra.Command, args []string) {
7373
defer stats.Flush()
7474
}
7575
port := configuration.Settings.GetString("daemon.port")
76-
var s *grpc.Server
76+
gRPCOptions := []grpc.ServerOption{}
7777
if debug {
78-
s = grpc.NewServer(
78+
gRPCOptions = append(gRPCOptions,
7979
grpc.UnaryInterceptor(unaryLoggerInterceptor),
8080
grpc.StreamInterceptor(streamLoggerInterceptor),
8181
)
82-
} else {
83-
s = grpc.NewServer()
8482
}
83+
s := grpc.NewServer(gRPCOptions...)
8584
// Set specific user-agent for the daemon
8685
configuration.Settings.Set("network.user_agent_ext", "daemon")
8786

i18n/data/en.po

+4-4
Original file line numberDiff line numberDiff line change
@@ -1027,19 +1027,19 @@ msgstr "Failed to create data directory"
10271027
msgid "Failed to create downloads directory"
10281028
msgstr "Failed to create downloads directory"
10291029

1030-
#: cli/daemon/daemon.go:125
1030+
#: cli/daemon/daemon.go:124
10311031
msgid "Failed to listen on TCP port: %[1]s. %[2]s is an invalid port."
10321032
msgstr "Failed to listen on TCP port: %[1]s. %[2]s is an invalid port."
10331033

1034-
#: cli/daemon/daemon.go:119
1034+
#: cli/daemon/daemon.go:118
10351035
msgid "Failed to listen on TCP port: %[1]s. %[2]s is unknown name."
10361036
msgstr "Failed to listen on TCP port: %[1]s. %[2]s is unknown name."
10371037

1038-
#: cli/daemon/daemon.go:134
1038+
#: cli/daemon/daemon.go:133
10391039
msgid "Failed to listen on TCP port: %[1]s. Unexpected error: %[2]v"
10401040
msgstr "Failed to listen on TCP port: %[1]s. Unexpected error: %[2]v"
10411041

1042-
#: cli/daemon/daemon.go:131
1042+
#: cli/daemon/daemon.go:130
10431043
msgid "Failed to listen on TCP port: %s. Address already in use."
10441044
msgstr "Failed to listen on TCP port: %s. Address already in use."
10451045

i18n/rice-box.go

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)