1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-24 10:07:04 +02:00

fix(service): profile stop error scope

This commit is contained in:
Davincible 2022-11-16 05:07:41 +01:00
parent 0a91ba7b5d
commit 68a6425ad8
No known key found for this signature in database
GPG Key ID: E7671D2784D7F7AA

View File

@ -149,9 +149,8 @@ func (s *service) Run() (err error) {
}
defer func() {
err = s.opts.Profile.Stop()
if err != nil {
logger.Log(log.ErrorLevel, err)
if nerr := s.opts.Profile.Stop(); nerr != nil {
logger.Log(log.ErrorLevel, nerr)
}
}()
}