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

Timer in MessageStream listener not initialized when heartbeat is turned off and throws NRE on Dispose

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.2 Beta-2
    • 1.1.6, 1.2 Beta
    • None
    • None

    Description

      From end-user:

      In MessageStreamListener.cs, there is a private member variable called timer (which is an instance of System.Threading.Timer). This is not initialized if HeartbeatSettings.IsEnabled is false. However the code will de-reference it two places within Heartbeat.Dispose() and one place within Heartbeat.Worker(). I saw that at a minimum it was throwing exceptions in Dispose() as a result of this.

      I didn't see Worker() throw, but they do have a try/catch there, which if triggered by this would result in an erroneous "HB: Node not available" message being logged (I say erroneous because this particular exception would only happen if a read completed without an exception).

      Attachments

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

        Activity

          People

            john John Zablocki (Inactive)
            john John Zablocki (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty