Skip to content

Commit

Permalink
Fix SplitHTTP H3 waited for downResponse before uploading
Browse files Browse the repository at this point in the history
  • Loading branch information
RPRX authored Jul 21, 2024
1 parent 22535d8 commit 468d5c4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions transport/internet/splithttp/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"net/http/httptrace"
"sync"

"github.com/quic-go/quic-go/http3"
"github.com/xtls/xray-core/common"
"github.com/xtls/xray-core/common/errors"
"github.com/xtls/xray-core/common/net"
Expand Down Expand Up @@ -94,6 +95,10 @@ func (c *DefaultDialerClient) OpenDownload(ctx context.Context, baseURL string)
gotDownResponse.Close()
}()

if _, h3 := c.download.Transport.(*http3.RoundTripper); h3 {
gotConn.Close()
}

// we want to block Dial until we know the remote address of the server,
// for logging purposes
<-gotConn.Wait()
Expand Down

0 comments on commit 468d5c4

Please # to comment.