Gracefully handle EINPROGRESS/WSAEINPROGRESS when calling connect() on a non-blocking socket

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Networking & Observability
    • ALL
    • Service Arch 2022-07-25, Networking & Obs 2024-05-27
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      EINPROGRESS (WSAEINPROGRESS for Windows) indicates that a non-blocking socket's connection couldn't be established immediately – the connection is still being established at the point-in-time of the error. The manpages state that the proper next step when receiving this error is to call select on the socket to verify that a connection has been established. After this point, any such operation can continue as expected.

      As of current-day MongoDB, connection establishment code automatically fails on EINPROGRESS (as seen in the linked BFs). This ticket is to audit all places where we call connect() on a non-blocking socket and add the logic to catch EINPROGRESS and verify the socket's connectedness.

            Assignee:
            Unassigned
            Reporter:
            Blake Oler
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: