Don’t error when process UID not found
This commit is contained in:
1 parent
03a47ef527
commit
071ff37317
1 file changed
+4
-3
+4
-3
@@ -2,6 +2,7 @@ package libv2ray
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
corenet "github.com/xtls/xray-core/common/net"
|
corenet "github.com/xtls/xray-core/common/net"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -44,9 +45,9 @@ func (x *CoreController) RegisterProcessFinder(finder ProcessFinder) {
|
|||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
uid = finder.FindProcessByConnection(network, srcIP, int(srcPort), destIP, int(destPort))
|
uid = finder.FindProcessByConnection(network, srcIP, int(srcPort), destIP, int(destPort))
|
||||||
if uid < 0 {
|
// if uid < 0 {
|
||||||
return 0, "", "", fmt.Errorf("processFinder, not found for %s %s:%d -> %s:%d", network, srcIP, srcPort, destIP, destPort)
|
// return 0, "", "", fmt.Errorf("processFinder, not found for %s %s:%d -> %s:%d", network, srcIP, srcPort, destIP, destPort)
|
||||||
}
|
// }
|
||||||
return uid, fmt.Sprintf("%d", uid), "", nil
|
return uid, fmt.Sprintf("%d", uid), "", nil
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user