The connection pool's ASIOTimer needs more synchronization and shared state to work with asio's timer

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 3.1.9
    • Affects Version/s: 3.1.8
    • Component/s: Networking
    • None
    • Fully Compatible
    • ALL
    • Platform 9 (09/18/15)
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      asio's underlying timers have fairly loose behavior on cancel. Specifically, a cancelled callback can be invoked with or without the cancelled error code.

      In the case of dtors that invoke callbacks, this means that we must have a shared pointer around with a lifetime longer than the actual ASIOTimer so that we can check if we've been cancelled (because we can't look at the original object).

      In addition, we can call cancel/set multiple times, so we should keep a counter around so we know if the callback we're in should be invoked, even if the timer itself is currently active

            Assignee:
            Mira Carey
            Reporter:
            Mira Carey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: