Skip to content

Commit

Permalink
fix: Set id query param, according to the negotiateVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
freeman committed Oct 25, 2023
1 parent 586d67b commit 747ba55
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion httpconnection.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,13 @@ func NewHTTPConnection(ctx context.Context, address string, options ...func(*htt
}

q := reqURL.Query()
q.Set("id", negotiateResponse.ConnectionID)
switch negotiateResponse.NegotiateVersion {
case 0:
q.Set("id", negotiateResponse.ConnectionID)
case 1:
q.Set("id", negotiateResponse.ConnectionToken)
}

reqURL.RawQuery = q.Encode()

// Select the best connection
Expand Down

0 comments on commit 747ba55

Please sign in to comment.