Skip to content

Commit

Permalink
More debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
vikulin committed Jun 20, 2024
1 parent 22b55cd commit e995f9c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/multicast/multicast.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ func (m *Multicast) AnnounceNow() {
}

func (m *Multicast) _announce() {
m.log.Infoln("Announce")
if !m._isOpen {
return
}
Expand Down Expand Up @@ -256,6 +257,7 @@ func (m *Multicast) _announce() {
found := false
listenaddr, err := net.ResolveTCPAddr("tcp6", info.listener.Listener.Addr().String())
if err != nil {
m.log.Infoln("ResolveTCPAddr on", info.listener.Listener.Addr().String(), "due to error:", err)
stop()
continue
}
Expand Down Expand Up @@ -361,12 +363,14 @@ func (m *Multicast) listen() {
bs := make([]byte, 2048)
for {
nBytes, rcm, fromAddr, err := m.sock.ReadFrom(bs)
m.log.Infoln("Multicat loop start")
if err != nil {
if !m.IsStarted() {
return
}
panic(err)
}
m.log.Infoln("Multicat loop continue")
if rcm != nil {
// Windows can't set the flag needed to return a non-nil value here
// So only make these checks if we get something useful back
Expand Down

0 comments on commit e995f9c

Please sign in to comment.