Skip to content

Commit feee9b3

Browse files
committed
chore: remove unneeded tls timeout in anytls
1 parent 63e66f4 commit feee9b3

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

transport/anytls/client.go

+1-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99

1010
"github.com/metacubex/mihomo/common/atomic"
1111
"github.com/metacubex/mihomo/common/buf"
12-
C "github.com/metacubex/mihomo/constant"
1312
"github.com/metacubex/mihomo/transport/anytls/padding"
1413
"github.com/metacubex/mihomo/transport/anytls/session"
1514
"github.com/metacubex/mihomo/transport/vmess"
@@ -83,12 +82,7 @@ func (c *Client) CreateOutboundTLSConnection(ctx context.Context) (net.Conn, err
8382
b.WriteZeroN(paddingLen)
8483
}
8584

86-
getTlsConn := func() (net.Conn, error) {
87-
ctx, cancel := context.WithTimeout(ctx, C.DefaultTLSTimeout)
88-
defer cancel()
89-
return vmess.StreamTLSConn(ctx, conn, c.tlsConfig)
90-
}
91-
tlsConn, err := getTlsConn()
85+
tlsConn, err := vmess.StreamTLSConn(ctx, conn, c.tlsConfig)
9286
if err != nil {
9387
conn.Close()
9488
return nil, err

0 commit comments

Comments
 (0)