mirror of
https://github.com/KusakabeShi/EtherGuard-VPN.git
synced 2024-11-28 18:23:08 +01:00
No more finalizer for rwcancel
This commit is contained in:
parent
17262dfd62
commit
8b30278ce6
@ -9,7 +9,6 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
"os"
|
"os"
|
||||||
"runtime"
|
|
||||||
"syscall"
|
"syscall"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -52,10 +51,6 @@ func NewRWCancel(fd int) (*RWCancel, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
runtime.SetFinalizer(&rwcancel, func(rw *RWCancel) {
|
|
||||||
rw.Cancel()
|
|
||||||
})
|
|
||||||
|
|
||||||
return &rwcancel, nil
|
return &rwcancel, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user