We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
closeMatch
1 parent 65bfd8a commit 143c84dCopy full SHA for 143c84d
core/src/main/golang/native/tunnel/conn.go
@@ -12,20 +12,17 @@ func CloseAllConnections() {
12
})
13
}
14
15
-func closeMatch(filter func(conn C.Conn) bool) {
+func closeMatch(filter func(conn C.Connection) bool) {
16
statistic.DefaultManager.Range(func(c statistic.Tracker) bool {
17
- if cc, ok := c.(C.Conn); ok {
18
- if filter(cc) {
19
- _ = cc.Close()
20
- return true
21
- }
+ if filter(c) {
+ _ = c.Close()
22
23
- return false
+ return true
24
25
26
27
func closeConnByGroup(name string) {
28
- closeMatch(func(conn C.Conn) bool {
+ closeMatch(func(conn C.Connection) bool {
29
for _, c := range conn.Chains() {
30
if c == name {
31
return true
0 commit comments