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

lib: reserve the fd on reconnect #432

Merged
merged 1 commit into from
Nov 25, 2024
Merged

Commits on Nov 22, 2024

  1. lib: reserve the fd on reconnect

    On reconnect case, the iscsi_tcp_connect tries to reuse
    the fd number of old_iscsi. However, this fd could have been
    already closed in previous iscsi_tcp_disconnect if
    iscsi->fd == iscsi->old_iscsi->fd and the fd number
    might have been allocated to some other caller, in this
    case the fd reuse in iscsi_tcp_connect is not safe anymore.
    
    Solve this by not closing the fd if iscsi and old_iscsi
    share the same fd on reconnect to "really" reserve this
    fd number.
    
    Signed-off-by: Tianren Zhang <[email protected]>
    Tianren Zhang committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    97ba4c3 View commit details
    Browse the repository at this point in the history