mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
feature #863: write 100 byte blocks to ssh so the pipe is not filled
This commit is contained in:
parent
36127a584a
commit
82a78bb9a6
@ -63,7 +63,16 @@ class SshStream
|
||||
@err = ""
|
||||
|
||||
begin
|
||||
@stdin.write "(#{command}); #{EOF_CMD}\n"
|
||||
cmd="(#{command}); #{EOF_CMD}\n"
|
||||
|
||||
sliced=cmd.scan(/.{1,100}/)
|
||||
|
||||
sliced.each do |slice|
|
||||
@stdin.write slice
|
||||
@stdin.flush
|
||||
end
|
||||
|
||||
@stdin.puts
|
||||
@stdin.flush
|
||||
rescue
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user