Improve API for GetAddress and GetSubnet

This commit is contained in:
Neil Alexander 2018-05-24 15:30:35 +01:00
parent b5057d60ad
commit c5782ca00a
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
5 changed files with 21 additions and 23 deletions

View file

@ -16,10 +16,10 @@ type multicast struct {
func (m *multicast) init(core *Core) {
m.core = core
m.groupAddr = "[ff02::114]:9001"
// Check if we've been given any expressions
if len(m.core.ifceExpr) == 0 {
return
}
// Check if we've been given any expressions
if len(m.core.ifceExpr) == 0 {
return
}
// Ask the system for network interfaces
allifaces, err := net.Interfaces()
if err != nil {
@ -72,7 +72,7 @@ func (m *multicast) start() error {
go m.listen()
go m.announce()
}
return nil
return nil
}
func (m *multicast) announce() {