Skip to content

Commit

Permalink
Revert "More debug messages"
Browse files Browse the repository at this point in the history
This reverts commit 56a713d.
  • Loading branch information
vikulin committed Jun 19, 2024
1 parent 0f54563 commit 3e97827
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/multicast/multicast.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ func (m *Multicast) _start() error {
if !anyEnabled {
return nil
}
m.log.Infoln("Starting multicast module")
defer m.log.Infoln("Started multicast module")
m.log.Debugln("Starting multicast module")
defer m.log.Debugln("Started multicast module")
addr, err := net.ResolveUDPAddr("udp", string(m.config._groupAddr))
if err != nil {
return err
Expand All @@ -98,7 +98,6 @@ func (m *Multicast) _start() error {
lc := net.ListenConfig{
Control: m.multicastReuse,
}
m.log.Infoln("Starting to listen packet")
conn, err := lc.ListenPacket(context.Background(), "udp6", listenString)
if err != nil {
return err
Expand Down Expand Up @@ -131,7 +130,7 @@ func (m *Multicast) Stop() error {
phony.Block(m, func() {
err = m._stop()
})
m.log.Infoln("Stopped multicast module")
m.log.Debugln("Stopped multicast module")
return err
}

Expand Down Expand Up @@ -239,7 +238,7 @@ func (m *Multicast) _announce() {
stop := func() {
info.listener.Close()
delete(m._listeners, name)
m.log.Infoln("No longer multicasting on", name)
m.log.Debugln("No longer multicasting on", name)
}
// If the interface is no longer visible on the system then stop the
// listener, as another one will be started further down
Expand Down Expand Up @@ -305,7 +304,7 @@ func (m *Multicast) _announce() {
panic(err)
}
if li, err := m.core.Listen(u, iface.Name); err == nil {
m.log.Infoln("Started multicasting on", iface.Name)
m.log.Debugln("Started multicasting on", iface.Name)
// Store the listener so that we can stop it later if needed
linfo = &listenerInfo{listener: li, time: time.Now(), port: info.port}
m._listeners[iface.Name] = linfo
Expand Down Expand Up @@ -404,10 +403,10 @@ func (m *Multicast) listen() {
pin := fmt.Sprintf("/?key=%s&priority=%d", hex.EncodeToString(key), info.priority)
u, err := url.Parse("tls://" + addr.String() + pin)
if err != nil {
m.log.Infoln("Call from multicast failed, parse error:", addr.String(), err)
m.log.Debugln("Call from multicast failed, parse error:", addr.String(), err)
}
if err := m.core.CallPeer(u, from.Zone); err != nil {
m.log.Infoln("Call from multicast failed:", err)
m.log.Debugln("Call from multicast failed:", err)
}
}
}
Expand Down

0 comments on commit 3e97827

Please sign in to comment.