From b538d23a28b159a892b7e3211eee181bb5c0e2e1 Mon Sep 17 00:00:00 2001 From: "J. Yi" <93548144+jyyi1@users.noreply.github.com> Date: Thu, 14 Mar 2024 16:18:31 -0400 Subject: [PATCH] refactor: remove unused alwaysSplitHTTPS flag (#506) The code that modifies the `alwaysSplitHTTPS` flag has been removed in #241 . So now it will always be `false`, and there is no need to keep that branch any more. --- Android/app/src/go/intra/stream_dialer.go | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/Android/app/src/go/intra/stream_dialer.go b/Android/app/src/go/intra/stream_dialer.go index 0af65b8a..f65a6392 100644 --- a/Android/app/src/go/intra/stream_dialer.go +++ b/Android/app/src/go/intra/stream_dialer.go @@ -31,12 +31,11 @@ import ( ) type intraStreamDialer struct { - fakeDNSAddr netip.AddrPort - dns atomic.Pointer[doh.Resolver] - dialer *net.Dialer - alwaysSplitHTTPS atomic.Bool - listener TCPListener - sniReporter *tcpSNIReporter + fakeDNSAddr netip.AddrPort + dns atomic.Pointer[doh.Resolver] + dialer *net.Dialer + listener TCPListener + sniReporter *tcpSNIReporter } var _ transport.StreamDialer = (*intraStreamDialer)(nil) @@ -96,12 +95,8 @@ func (sd *intraStreamDialer) SetDNS(dns doh.Resolver) error { func (sd *intraStreamDialer) dial(ctx context.Context, dest netip.AddrPort, stats *TCPSocketSummary) (transport.StreamConn, error) { if dest.Port() == 443 { - if sd.alwaysSplitHTTPS.Load() { - return split.DialWithSplit(sd.dialer, net.TCPAddrFromAddrPort(dest)) - } else { - stats.Retry = &split.RetryStats{} - return split.DialWithSplitRetry(ctx, sd.dialer, net.TCPAddrFromAddrPort(dest), stats.Retry) - } + stats.Retry = &split.RetryStats{} + return split.DialWithSplitRetry(ctx, sd.dialer, net.TCPAddrFromAddrPort(dest), stats.Retry) } else { tcpsd := &transport.TCPStreamDialer{ Dialer: *sd.dialer,