Preallocate buffers so we don't explode limit

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2018-09-17 00:40:09 +02:00
parent b5783d7d21
commit f16260db25
1 changed files with 1 additions and 0 deletions

View File

@ -52,6 +52,7 @@ var tunnelHandles map[int32]*Device
func init() { func init() {
versionString = C.CString(WireGuardGoVersion) versionString = C.CString(WireGuardGoVersion)
preallocatedBuffers = 64
roamingDisabled = true roamingDisabled = true
tunnelHandles = make(map[int32]*Device) tunnelHandles = make(map[int32]*Device)
signals := make(chan os.Signal) signals := make(chan os.Signal)