Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't cache the socket-IO while connection setup #444

Merged
merged 1 commit into from
Mar 9, 2022
Merged

Commits on Mar 9, 2022

  1. Don't cache the socket-IO while connection setup

    The file_no of the socket IO can change while connecting.
    This can happen when alternative hosts are tried,
    while GSS authentication
    and when falling back to unencrypted in sslmode:prefer .
    Therefore expire the socket IO at each connect_poll and reset_poll call.
    
    Caching the IO previosly led to occasional errors kind of:
      Errno::EBADF: Bad file descriptor
    
    With the recreation of an IO object per connect_poll the fileno can change in the TcpGateScheduler when running on Windows.
    I didn't dig deeper why this happens, but it fails in spec
      "with a Fiber scheduler connects several times concurrently"
    and sometimes in other specs.
    larskanis committed Mar 9, 2022
    Configuration menu
    Copy the full SHA
    c76b123 View commit details
    Browse the repository at this point in the history