AsynchronousTlsChannelGroup.RegisteredSocket can cause an NPE

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 3.12.5, 4.0.4
    • Affects Version/s: 3.12.3, 4.0.2
    • Component/s: Async
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Looks to be a race condition where non final values have might not be set and close() is called on the channel group.

              public void close() {
                  doCancelRead(this, null);
                  doCancelWrite(this, null);
                  key.cancel();  // NPE if key == null
                  currentRegistrations.getAndDecrement();
                  /*
                   * Actual de-registration from the selector will happen asynchronously.
                   */
                  selector.wakeup();
              }
      

              Assignee:
              Ross Lawley
              Reporter:
              Ross Lawley
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: