mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-18 02:48:40 +00:00
wgengine/magicsock: enable batching ops for android
Signed-off-by: Jordan Whited <jordan@tailscale.com>
This commit is contained in:
parent
21abb7f402
commit
16c4fc58bd
@ -2177,7 +2177,7 @@ var _ conn.Bind = (*connBind)(nil)
|
||||
func (c *connBind) BatchSize() int {
|
||||
// TODO(raggi): determine by properties rather than hardcoding platform behavior
|
||||
switch runtime.GOOS {
|
||||
case "linux":
|
||||
case "linux", "android":
|
||||
return conn.IdealBatchSize
|
||||
default:
|
||||
return 1
|
||||
@ -2682,7 +2682,7 @@ func tryUpgradeToBatchingUDPConn(pconn nettype.PacketConn, network string, batch
|
||||
if network != "udp4" && network != "udp6" {
|
||||
return pconn
|
||||
}
|
||||
if runtime.GOOS != "linux" {
|
||||
if runtime.GOOS != "linux" && runtime.GOOS != "android" {
|
||||
return pconn
|
||||
}
|
||||
if strings.HasPrefix(hostinfo.GetOSVersion(), "2.") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user