module Net::SSH::ForwardedBufferedIo

def send_pending

def send_pending
  begin
    super                                                          
  rescue Errno::ECONNRESET => e
    debug { "connection was reset => shallowing exception:#{e}" }
    return 0
  rescue IOError => e
    if e.message =~ /closed/ then 
      debug { "connection was reset => shallowing exception:#{e}" }
      return 0
    else
      raise
    end
  end
end