From 747ba55f12af7580fe2d00c1d409bde400fa7aab Mon Sep 17 00:00:00 2001 From: freeman Date: Wed, 25 Oct 2023 13:05:00 +0300 Subject: [PATCH] fix: Set id query param, according to the negotiateVersion --- httpconnection.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/httpconnection.go b/httpconnection.go index 83448b8..46f84e6 100644 --- a/httpconnection.go +++ b/httpconnection.go @@ -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