mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2025-06-16 15:56:06 +00:00
Merge branch 'develop' of https://github.com/yggdrasil-network/yggdrasil-go into switch
This commit is contained in:
@ -415,6 +415,7 @@ func (t *switchTable) unlockedHandleMsg(msg *switchMsg, fromPort switchPort, rep
|
||||
// Update the matrix of peer "faster" thresholds
|
||||
if reprocessing {
|
||||
sender.faster = oldSender.faster
|
||||
sender.time = oldSender.time
|
||||
} else {
|
||||
sender.faster = make(map[switchPort]uint64, len(oldSender.faster))
|
||||
for port, peer := range t.data.peers {
|
||||
|
@ -36,7 +36,6 @@ type tcpInterface struct {
|
||||
reconfigure chan chan error
|
||||
serv net.Listener
|
||||
stop chan bool
|
||||
timeout time.Duration
|
||||
addr string
|
||||
mutex sync.Mutex // Protecting the below
|
||||
calls map[string]struct{}
|
||||
@ -106,13 +105,8 @@ func (iface *tcpInterface) listen() error {
|
||||
|
||||
iface.core.configMutex.RLock()
|
||||
iface.addr = iface.core.config.Listen
|
||||
iface.timeout = time.Duration(iface.core.config.ReadTimeout) * time.Millisecond
|
||||
iface.core.configMutex.RUnlock()
|
||||
|
||||
if iface.timeout >= 0 && iface.timeout < default_timeout {
|
||||
iface.timeout = default_timeout
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
lc := net.ListenConfig{
|
||||
Control: iface.tcpContext,
|
||||
|
Reference in New Issue
Block a user