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

Close connection on ErrPktSync and ErrPktSyncMul #1473

Merged
merged 1 commit into from
Sep 30, 2023

Commits on Aug 9, 2023

  1. Close connection on ErrPktSync and ErrPktSyncMul

    An `ErrPktSync` or `ErrPktSyncMul` error always means that a packet
    header has been read, but since the sequence ID was not correct then the
    packet payload has not been read. This results in the connection being
    left in a broken state, since any future operations will always result
    in a "busy buffer" error. Keeping such connections alive leads to them
    being repeatedly returned to the pool in this state, which can in turn
    result in a large number of failures due to these "busy buffer" errors.
    
    This commit fixes this problem by simply closing the connection before
    returning either `ErrPktSync` or `ErrPktSyncMul`. This ensures that the
    connection won't be returned to the pool, preventing it from causing any
    further errors.
    owbone committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    88bbc4b View commit details
    Browse the repository at this point in the history