My change foraa2e0c0749
, with the fix in8df8d6c7ac
, appears effective, but only handles system call failures on write: sometimes the program only receives notification of the connection being closed upon a read, like this: /app/vendor/bundle/ruby/3.4.0/gems/net-ssh-7.3.0/lib/net/ssh/buffered_io.rb:64:in 'BasicSocket#recv' /app/vendor/bundle/ruby/3.4.0/gems/net-ssh-7.3.0/lib/net/ssh/buffered_io.rb:64:in 'Net::SSH::BufferedIo#fill' /app/vendor/bundle/ruby/3.4.0/gems/net-ssh-7.3.0/lib/net/ssh/connection/session.rb:275:in 'block in Net::SSH::Connection::Session#ev_do_handle_events' The exception is an instance of `Errno::ECONNRESET` with a message like `Connection reset by peer - recvfrom(2)`. So, handle it much the same way, and refactor the tests to test with either exception.
4.2 KiB
4.2 KiB