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 #2371] Do not log EOFError #2384

Merged
merged 3 commits into from Sep 27, 2020

Commits on Sep 25, 2020

  1. Failing test for #2371

    The EOF can be triggered by opening a connection, not writing to it, then closing the connection. When this happens we can detect if an error was logged or not by inspecting the stderr string. 
    
    This test fails
    schneems committed Sep 25, 2020
    Copy the full SHA
    8c5ef9b View commit details
    Browse the repository at this point in the history
  2. [close #2371] Do not log EOFError

    This is a continuation from #2382.
    
    One of the ways that an EOFError can be triggered is by opening a connection, not writing to it, then closing it (there may be others). This should be an expected and non-exceptional activity. When it happens we should not log it.
    
    This commit gets the test in the prior commit to pass.
    
    The change to client.rb makes sense to me as this is the initial place where we're reading from the socket and then finding out the stream has been closed. Im not quite sure why the code in server.rb is needed. I think this comes from when the server is shutting down and trying to finish out connections.
    
    I don't think this is the 100% right way to do things. I'm guessing that if we get an EOFError on a connection we should somehow consider it "dead" and never try to read from it again. I don't know if there's a better way to signify this in the `try_to_finish` method of client.rb
    schneems committed Sep 25, 2020
    Copy the full SHA
    dfd198d View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    c6ba90c View commit details
    Browse the repository at this point in the history