Qpid
  1. Qpid
  2. QPID-4489

[Java broker] ensure the IoSender is stopped when a connection closes before receiving a protocol initiation

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.14, 0.15, 0.16, 0.17, 0.18, 0.19
    • Fix Version/s: 0.20
    • Component/s: Java Broker
    • Labels:
      None

      Description

      If the IoReceiver exits (due to the TCP connection closing) before a protocol version initiation is received (successfully or otherwise), the IoSender will fail to be closed.

      In this case the IoReceiver signals closed() to the receiver it was created with, a MultiVersionProtocolEngine with an initial SelfDelegateProtocolEngine delegate, but this delegate fails to close the IoSender. The IoSender is currently only closed when a received version initiation fails and the broker replies with a valid protocol version (for negotiation purposes) before closing the network connection, or if the closed() signal occurs after a protocol version initiation succeeds and the MVPE delegate is replaced with the relevant versions delegate.

      The SelfDelegateProtocolEngine should be updated to close the associated network connection (and thus the IoSender) if its closed() method is called.

        Activity

        Hide
        Robbie Gemmell added a comment -
        Show
        Robbie Gemmell added a comment - Change made in http://svn.apache.org/viewvc?rev=1416716&view=rev
        Hide
        Robbie Gemmell added a comment -

        Rob, can you review this please?

        Thanks,
        Robbie

        Show
        Robbie Gemmell added a comment - Rob, can you review this please? Thanks, Robbie
        Hide
        Rob Godfrey added a comment - - edited

        Change looks good. Effect obviously isolated to people opening and then immediately closing connections before establishing AMQP protocol. As such I would be happy with this going into 0.20.

        Show
        Rob Godfrey added a comment - - edited Change looks good. Effect obviously isolated to people opening and then immediately closing connections before establishing AMQP protocol. As such I would be happy with this going into 0.20.
        Hide
        Justin Ross added a comment -

        Reviewed by Rob. Approved for 0.20.

        Show
        Justin Ross added a comment - Reviewed by Rob. Approved for 0.20.
        Hide
        Robbie Gemmell added a comment -

        Change now merged to the 0.20 release branch.

        Show
        Robbie Gemmell added a comment - Change now merged to the 0.20 release branch.

          People

          • Assignee:
            Rob Godfrey
            Reporter:
            Robbie Gemmell
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development