mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2025-07-07 01:04:07 +00:00
upgrade phony dependency and switch to its new interface
This commit is contained in:
@ -174,7 +174,7 @@ type switchTable struct {
|
||||
data switchData //
|
||||
updater atomic.Value // *sync.Once
|
||||
table atomic.Value // lookupTable
|
||||
phony.Actor // Owns the below
|
||||
phony.Inbox // Owns the below
|
||||
queues switch_buffers // Queues - not atomic so ONLY use through the actor
|
||||
idle map[switchPort]time.Time // idle peers - not atomic so ONLY use through the actor
|
||||
}
|
||||
@ -828,8 +828,8 @@ func (t *switchTable) _handleIdle(port switchPort) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (t *switchTable) packetInFrom(from phony.IActor, bytes []byte) {
|
||||
t.EnqueueFrom(from, func() {
|
||||
func (t *switchTable) packetInFrom(from phony.Actor, bytes []byte) {
|
||||
t.RecvFrom(from, func() {
|
||||
t._packetIn(bytes)
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user