1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-03-27 21:49:08 +02:00

add notes by not used defer (#2291)

This commit is contained in:
jesse.tang 2022-08-18 10:58:56 +08:00 committed by GitHub
parent ba72230477
commit 6ca225b078
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
app.go
View File

@ -101,7 +101,7 @@ func (a *App) Run() error {
})
wg.Add(1)
eg.Go(func() error {
wg.Done()
wg.Done() // here is to ensure server start has begun running before register, so defer is not needed
return srv.Start(NewContext(a.opts.ctx, a))
})
}