зеркало из https://github.com/github/ruby.git
* lib/net/smtp.rb (Net::SMTP#data): enable buffering while
'data' send for optimizing Net::SMTP#send_message. [ruby-dev:48329] [misc #9981] patch by Masahiro Tomita. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
f11c30e801
Коммит
00eb720394
|
@ -1,3 +1,10 @@
|
||||||
|
Sat Jul 12 04:17:40 2014 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||||
|
|
||||||
|
* lib/net/smtp.rb (Net::SMTP#data): enable buffering while
|
||||||
|
'data' send for optimizing Net::SMTP#send_message.
|
||||||
|
[ruby-dev:48329] [misc #9981]
|
||||||
|
patch by Masahiro Tomita.
|
||||||
|
|
||||||
Sat Jul 12 01:13:45 2014 Naohisa Goto <ngotogenome@gmail.com>
|
Sat Jul 12 01:13:45 2014 Naohisa Goto <ngotogenome@gmail.com>
|
||||||
|
|
||||||
* test/ruby/envutil.rb (assert_no_memory_leak): On Solaris 9 or later,
|
* test/ruby/envutil.rb (assert_no_memory_leak): On Solaris 9 or later,
|
||||||
|
|
|
@ -901,11 +901,18 @@ module Net
|
||||||
end
|
end
|
||||||
res = critical {
|
res = critical {
|
||||||
check_continue get_response('DATA')
|
check_continue get_response('DATA')
|
||||||
|
socket_sync_bak = @socket.io.sync
|
||||||
|
begin
|
||||||
|
@socket.io.sync = false
|
||||||
if msgstr
|
if msgstr
|
||||||
@socket.write_message msgstr
|
@socket.write_message msgstr
|
||||||
else
|
else
|
||||||
@socket.write_message_by_block(&block)
|
@socket.write_message_by_block(&block)
|
||||||
end
|
end
|
||||||
|
ensure
|
||||||
|
@socket.io.flush
|
||||||
|
@socket.io.sync = socket_sync_bak
|
||||||
|
end
|
||||||
recv_response()
|
recv_response()
|
||||||
}
|
}
|
||||||
check_response res
|
check_response res
|
||||||
|
|
Загрузка…
Ссылка в новой задаче