mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-04-03 03:47:37 +03:00
Add retry for linux process search
This commit is contained in:
parent
7d8a7c5c7d
commit
29c329dc52
1 changed files with 10 additions and 0 deletions
|
@ -38,6 +38,16 @@ const (
|
|||
)
|
||||
|
||||
func resolveSocketByNetlink(network string, ip netip.Addr, srcPort int) (inode int32, uid int32, err error) {
|
||||
for attempts := 0; attempts < 3; attempts++ {
|
||||
inode, uid, err = resolveSocketByNetlink0(network, ip, srcPort)
|
||||
if err == nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func resolveSocketByNetlink0(network string, ip netip.Addr, srcPort int) (inode int32, uid int32, err error) {
|
||||
var family byte
|
||||
var protocol byte
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue