Skip to content

Commit ca7ce02

Browse files
authored
Merge pull request #42 from LanXuage/fix-socks_global_var_and_local_var_conflict
Fix the conflict between global sessions & local sessions in socks/socks.go
2 parents ec957b8 + 9fb3940 commit ca7ce02

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

socks/socks.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func listenClient(port string) {
6161
}
6262

6363
func forward(conn net.Conn) {
64-
scfConn := pickConn(sessions)
64+
scfConn := pickConn()
6565

6666
_forward := func(src, dest net.Conn) {
6767
defer src.Close()
@@ -74,7 +74,7 @@ func forward(conn net.Conn) {
7474

7575
}
7676

77-
func pickConn(sessions []*yamux.Session) net.Conn {
77+
func pickConn() net.Conn {
7878
for {
7979
l := len(sessions)
8080
if l == 0 {

0 commit comments

Comments
 (0)