Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-1259

StreamingQueryClient fails on multiple queries

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.4.0
    • library
    • None

    Description

      If you execute multiple queries with UseStreaming(true), subsequent queries fail.  This is because you cannot set HttpClient.Timeout after executing the first request.

      Exception:

      System.InvalidOperationException
      This instance has already started one or more requests. Properties can only be modified before sending the first request.
      at System.Net.Http.HttpClient.CheckDisposedOrStarted()
      at System.Net.Http.HttpClient.set_Timeout(TimeSpan value)
      at Couchbase.N1QL.StreamingQueryClient.<ExecuteQueryAsync>d__3`1.MoveNext() in C:\Users\bburnett\Source\Repos\couchbase-net-client\Src\Couchbase\N1QL\StreamingQueryClient.cs:line 43

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          mike.goldsmith Michael Goldsmith added a comment - - edited

          I saw something similar in the View Client and moved the HttpClient.Timeout assignment into the constructor of the StreamingViewClient.

          mike.goldsmith Michael Goldsmith added a comment - - edited I saw something similar in the View Client and moved the HttpClient.Timeout assignment into the constructor of the StreamingViewClient.

          Having some trouble getting the integration tests to pass - reopening to investigate.

          mike.goldsmith Michael Goldsmith added a comment - Having some trouble getting the integration tests to pass - reopening to investigate.

          People

            mike.goldsmith Michael Goldsmith
            btburnett3 Brant Burnett
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty