1
0
mirror of https://git.zx2c4.com/wireguard-go synced 2024-11-15 01:05:15 +01:00

No more finalizer for rwcancel

This commit is contained in:
Jason A. Donenfeld 2018-05-14 06:10:08 +02:00
parent 17262dfd62
commit 8b30278ce6

View File

@ -9,7 +9,6 @@ import (
"errors"
"golang.org/x/sys/unix"
"os"
"runtime"
"syscall"
)
@ -52,10 +51,6 @@ func NewRWCancel(fd int) (*RWCancel, error) {
return nil, err
}
runtime.SetFinalizer(&rwcancel, func(rw *RWCancel) {
rw.Cancel()
})
return &rwcancel, nil
}