mirror of
https://github.com/go-micro/go-micro.git
synced 2025-01-23 17:53:05 +02:00
process opts on multiple init calls
This commit is contained in:
parent
b43985401a
commit
d7dc4e618b
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user