Qpid
  1. Qpid
  2. QPID-4047

IoNetworkTransport doesn't use timeout on socket connect

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.17
    • Component/s: Java Common
    • Labels:
      None

      Description

      line 76 of org/apache/qpid/transport/network/io/IoNetworkTransport calls _socket.connect without supplying a timeout value. This is equivalent to an infinite timeout. Re-use the _timeout field within the same class that specifies a 60 second timeout for reads?

      I've attached a patch.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        45m 40s 1 Rob Godfrey 08/Jun/12 20:58
        In Progress In Progress Resolved Resolved
        11m 57s 1 Rob Godfrey 08/Jun/12 21:10
        Hide
        Robbie Gemmell added a comment -

        After a little searching I figured out that I remembered the 'connecttimeout' URL option from some documentation changes Keith made earlier in the year. After examining the code a bit it seems that option is in need of repair, so I have raised QPID-4051 to cover it...and with that I think I'll begin my vacation

        Show
        Robbie Gemmell added a comment - After a little searching I figured out that I remembered the 'connecttimeout' URL option from some documentation changes Keith made earlier in the year. After examining the code a bit it seems that option is in need of repair, so I have raised QPID-4051 to cover it...and with that I think I'll begin my vacation
        Hide
        Praveen Murugesan added a comment -

        Rob, Thanks for getting to this immediately

        Show
        Praveen Murugesan added a comment - Rob, Thanks for getting to this immediately
        Rob Godfrey made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Rob Godfrey added a comment -

        I've made an equivalent change (since the value of _timeout is fixed and cannot be changed I have made it a constant within the class).

        Thanks for spotting this Praveen

        Show
        Rob Godfrey added a comment - I've made an equivalent change (since the value of _timeout is fixed and cannot be changed I have made it a constant within the class). Thanks for spotting this Praveen
        Hide
        Rob Godfrey added a comment -

        Seems like a reasonable enhancement. Ideally we should also make the timeout configurable (and possibly have different timeouts for the socket connection and the AMQP connection establishment) however I think we can leave this for another JIRA.

        Show
        Rob Godfrey added a comment - Seems like a reasonable enhancement. Ideally we should also make the timeout configurable (and possibly have different timeouts for the socket connection and the AMQP connection establishment) however I think we can leave this for another JIRA.
        Rob Godfrey made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Rob Godfrey made changes -
        Assignee Rob Godfrey [ rgodfrey ]
        Praveen Murugesan made changes -
        Field Original Value New Value
        Attachment addTimeOutOnSocketConnect.patch [ 12531428 ]
        Hide
        Praveen Murugesan added a comment -

        Patch.

        Show
        Praveen Murugesan added a comment - Patch.
        Praveen Murugesan created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development