4
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2025-07-06 06:24:06 +00:00

Merge branch 'develop' into switch

This commit is contained in:
Arceliar
2019-02-16 16:26:20 -06:00
3 changed files with 52 additions and 8 deletions

View File

@ -800,6 +800,7 @@ func (t *switchTable) doWorker() {
t.queues.bufs = make(map[string]switch_buffer) // Packets per PacketStreamID (string)
idle := make(map[switchPort]struct{}) // this is to deduplicate things
for {
t.core.log.Debugf("Switch state: idle = %d, buffers = %d", len(idle), len(t.queues.bufs))
select {
case bytes := <-t.packetIn:
// Try to send it somewhere (or drop it if it's corrupt or at a dead end)