mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-08-26 00:45:06 +03:00
go code autoformat
This commit is contained in:
parent
316a202c8f
commit
2cc402237e
10 changed files with 8 additions and 15 deletions
|
@ -4,7 +4,6 @@
|
|||
|
||||
package multicast
|
||||
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
|
||||
|
|
|
@ -20,10 +20,10 @@ func (m *Multicast) multicastReuse(network string, address string, c syscall.Raw
|
|||
var reuseaddr error
|
||||
|
||||
control = c.Control(func(fd uintptr) {
|
||||
// Previously we used SO_REUSEPORT here, but that meant that machines running
|
||||
// RiV-mesh nodes as different users would inevitably fail with EADDRINUSE.
|
||||
// The behaviour for multicast is similar with both, so we'll use SO_REUSEADDR
|
||||
// instead.
|
||||
// Previously we used SO_REUSEPORT here, but that meant that machines running
|
||||
// RiV-mesh nodes as different users would inevitably fail with EADDRINUSE.
|
||||
// The behaviour for multicast is similar with both, so we'll use SO_REUSEADDR
|
||||
// instead.
|
||||
if reuseaddr = unix.SetsockoptInt(int(fd), unix.SOL_SOCKET, unix.SO_REUSEADDR, 1); reuseaddr != nil {
|
||||
fmt.Fprintf(os.Stderr, "Failed to set SO_REUSEADDR on socket: %s\n", reuseaddr)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue