ClashMetaForAndroid icon indicating copy to clipboard operation
ClashMetaForAndroid copied to clipboard

fix: (native conn.go) `closeMatch` logic should really close all matching conns; closes PacketConn also

Open shunf4 opened this issue 8 months ago • 0 comments

In closeMatch, the callback function returns false when the logic not getting into matching branch. This is not correct; as per xsync.MapOf, if the callback function f returns false, Range function stops the iteration. f should always return true.

Also considering at present the massive adoption of reliable byte-stream protocol based on UDP (QUIC by browsers, for example), PacketConns should also be closed, if possible.

shunf4 avatar Jun 10 '24 18:06 shunf4