mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2026-05-22 05:46:30 +03:00
fix core.Logger (#1323)
Fixing typo
50def9362f/src/multicast/multicast.go (L64)
I didn't find anywhere else in the project where gologme was mistakenly
used instead of core.Logger
This commit is contained in:
@@ -13,7 +13,6 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/Arceliar/phony"
|
"github.com/Arceliar/phony"
|
||||||
"github.com/gologme/log"
|
|
||||||
"github.com/wlynxg/anet"
|
"github.com/wlynxg/anet"
|
||||||
|
|
||||||
"github.com/yggdrasil-network/yggdrasil-go/src/core"
|
"github.com/yggdrasil-network/yggdrasil-go/src/core"
|
||||||
@@ -28,7 +27,7 @@ import (
|
|||||||
type Multicast struct {
|
type Multicast struct {
|
||||||
phony.Inbox
|
phony.Inbox
|
||||||
core *core.Core
|
core *core.Core
|
||||||
log *log.Logger
|
log core.Logger
|
||||||
sock *ipv6.PacketConn
|
sock *ipv6.PacketConn
|
||||||
running atomic.Bool
|
running atomic.Bool
|
||||||
_listeners map[string]*listenerInfo
|
_listeners map[string]*listenerInfo
|
||||||
@@ -61,7 +60,7 @@ type listenerInfo struct {
|
|||||||
// Start starts the multicast interface. This launches goroutines which will
|
// Start starts the multicast interface. This launches goroutines which will
|
||||||
// listen for multicast beacons from other hosts and will advertise multicast
|
// listen for multicast beacons from other hosts and will advertise multicast
|
||||||
// beacons out to the network.
|
// beacons out to the network.
|
||||||
func New(core *core.Core, log *log.Logger, opts ...SetupOption) (*Multicast, error) {
|
func New(core *core.Core, log core.Logger, opts ...SetupOption) (*Multicast, error) {
|
||||||
m := &Multicast{
|
m := &Multicast{
|
||||||
core: core,
|
core: core,
|
||||||
log: log,
|
log: log,
|
||||||
@@ -362,7 +361,7 @@ func (m *Multicast) _announce() {
|
|||||||
}
|
}
|
||||||
destAddr.Zone = iface.Name
|
destAddr.Zone = iface.Name
|
||||||
if _, err = m.sock.WriteTo(msg, nil, destAddr); err != nil {
|
if _, err = m.sock.WriteTo(msg, nil, destAddr); err != nil {
|
||||||
m.log.Warn("Failed to send multicast beacon:", err)
|
m.log.Warnln("Failed to send multicast beacon: " + err.Error())
|
||||||
}
|
}
|
||||||
if linfo.interval.Seconds() < 15 {
|
if linfo.interval.Seconds() < 15 {
|
||||||
linfo.interval += time.Second
|
linfo.interval += time.Second
|
||||||
|
|||||||
Reference in New Issue
Block a user