Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2019-04-08 18:12:12 +0300
committerJacob Vosmaer <jacob@gitlab.com>2019-04-08 18:12:12 +0300
commit331aea8e497335630548fb816d89395d9313012c (patch)
treee56005a451cbaf885a50b4754e802002be10d291
parent76fcd64e721cd4ec14a514c10e61659a949b7a60 (diff)
Use defer
-rw-r--r--cmd/gitaly/main.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/cmd/gitaly/main.go b/cmd/gitaly/main.go
index 29e3d2b81..ff1e0f3d6 100644
--- a/cmd/gitaly/main.go
+++ b/cmd/gitaly/main.go
@@ -119,11 +119,7 @@ func main() {
if err != nil {
log.WithError(err).Fatal("start ruby server")
}
-
- go func() {
- <-b.Stop
- ruby.Stop()
- }()
+ defer ruby.Stop()
insecureServer := server.NewInsecure(ruby)
secureServer := server.NewSecure(ruby)