Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-67002

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

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

      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 Unassigned
            Reporter:
            blake.oler@mongodb.com Blake Oler
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: