Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1892

Socket timeouts are declared in milli-seconds, but are actually set in micro-seconds

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.9
    • Fix Version/s: 0.9.2
    • Component/s: C++ - Library
    • Labels:
    • Environment:

      Windows 8 x64

      Description

      Socket timeouts are declared in milliseconds in TSocket.h:

      /**

      • Set the connect timeout
        */
        void setConnTimeout(int ms);

      /**

      • Set the receive timeout
        */
        void setRecvTimeout(int ms);

      /**

      • Set the send timeout
        */
        void setSendTimeout(int ms);

      But, when i set timeout which is supposed to be 5000 seconds, and make a call to the service function that intentionally hangs, ETIMEDOUT exception occurs precisely after 5 seconds.

      socket->setConnTimeout(5*1000*1000);
      socket->setRecvTimeout(5*1000*1000);
      socket->setSendTimeout(5*1000*1000);

        Attachments

        1. winsock_mstimeouts.patch
          5 kB
          Ben Craig

          Issue Links

            Activity

              People

              • Assignee:
                ben.craig Ben Craig
                Reporter:
                alexp-ru Alexander
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: