Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions lib/net/imap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3661,10 +3661,8 @@ def send_command_with_continuations(cmd, *args)
end

def send_command(cmd, *args, &block)
args.each do validate_data _1 end
synchronize do
args.each do |i|
validate_data(i)
end
tag = generate_tag
command = Command[tag:, name: cmd]
put_string(tag + " " + cmd)
Expand All @@ -3681,10 +3679,10 @@ def send_command(cmd, *args, &block)
ensure
remove_response_handler(block) if block
end
rescue InvalidResponseError
disconnect
raise
end
rescue InvalidResponseError
disconnect
raise
end

# NOTE: This must be synchronized with sending the command's final CRLF and
Expand Down
Loading