mirror of
https://github.com/go-micro/go-micro.git
synced 2025-07-12 22:41:07 +02:00
process opts on multiple init calls
This commit is contained in:
@ -60,6 +60,10 @@ func (s *service) Init(opts ...Option) {
|
||||
// so we can call cmd.Init once.
|
||||
select {
|
||||
case <-s.init:
|
||||
// only process options
|
||||
for _, o := range opts {
|
||||
o(&s.opts)
|
||||
}
|
||||
default:
|
||||
// close init
|
||||
close(s.init)
|
||||
|
Reference in New Issue
Block a user