mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-27 11:12:24 +00:00
net/tstun: remove buffer on outbound channel
The buffer is not necessary, I was unable to observe any optimization, and having an unbuffered channel offers potential scheduler optimization. Signed-off-by: James Tucker <james@tailscale.com>
This commit is contained in:
parent
58f35261d0
commit
0c34fc7b5b
@ -202,10 +202,9 @@ func wrap(logf logger.Logf, tdev tun.Device, isTAP bool) *Wrapper {
|
|||||||
// a goroutine should not block when setting it, even with no listeners.
|
// a goroutine should not block when setting it, even with no listeners.
|
||||||
bufferConsumed: make(chan struct{}, 1),
|
bufferConsumed: make(chan struct{}, 1),
|
||||||
closed: make(chan struct{}),
|
closed: make(chan struct{}),
|
||||||
// outbound can be unbuffered; the buffer is an optimization.
|
outbound: make(chan tunReadResult),
|
||||||
outbound: make(chan tunReadResult, 1),
|
eventsUpDown: make(chan tun.Event),
|
||||||
eventsUpDown: make(chan tun.Event),
|
eventsOther: make(chan tun.Event),
|
||||||
eventsOther: make(chan tun.Event),
|
|
||||||
// TODO(dmytro): (highly rate-limited) hexdumps should happen on unknown packets.
|
// TODO(dmytro): (highly rate-limited) hexdumps should happen on unknown packets.
|
||||||
filterFlags: filter.LogAccepts | filter.LogDrops,
|
filterFlags: filter.LogAccepts | filter.LogDrops,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user