Remove unnecessary selects

This commit is contained in:
Neil Alexander 2019-01-15 08:51:19 +00:00
parent 39567bed83
commit 2cd373fc1e
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
8 changed files with 52 additions and 68 deletions

View file

@ -25,13 +25,11 @@ func (m *multicast) init(core *Core) {
m.reconfigure = make(chan chan error, 1)
go func() {
for {
select {
case e := <-m.reconfigure:
m.myAddrMutex.Lock()
m.myAddr = m.core.tcp.getAddr()
m.myAddrMutex.Unlock()
e <- nil
}
e := <-m.reconfigure
m.myAddrMutex.Lock()
m.myAddr = m.core.tcp.getAddr()
m.myAddrMutex.Unlock()
e <- nil
}
}()
m.groupAddr = "[ff02::114]:9001"