mongoc_stream_timed_out may return false for TLS write timeouts

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • C Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Scope

      Ensure mongoc_stream_timed_out returns true for TLS write timeouts

      Background
      Quoting mongoc_stream_timed_out documentation:

      Returns: True if there has been a network timeout error on this stream.

      However, this does not appear to be consistently true for TLS stream write timeouts. See:

      The fix may benefit from the new timed_out field proposed in CDRIVER-6187:

      if (write_ret < (ssize_t)buf_len) {
         tls->timed_out = true; // Indicate a timeout
         mongoc_counter_streams_timeout_inc();
      }
      

      But I am unsure how to test TLS write timeouts.

            Assignee:
            Unassigned
            Reporter:
            Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: