Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-1944

Background threads such as the Monitor cannot restart once stopped

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.11.0
    • Affects Version/s: 2.10.0
    • Component/s: None
    • None
    • Fully Compatible

      Threads that are stopped via a disconnect can't actually be restarted:

      > server.instance_variable_get(:@monitor).instance_variable_get(:@thread).alive?
      => true
      > server.disconnect!
      => true
      > server.reconnect!
      => true
      > server.instance_variable_get(:@monitor).instance_variable_get(:@thread).alive?
      => false
      > server.instance_variable_get(:@monitor).instance_variable_get(:@thread).alive?
      => false
      > server.instance_variable_get(:@monitor).instance_variable_get(:@thread).alive?
      => false
      

      https://github.com/mongodb/mongo-ruby-driver/pull/1534 should fix this.

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            jonhyman Jon Hyman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: