fix
git-svn-id: file:///home/svn/incoming/trunk@3088 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
fac9fff4bb
commit
21d1f17d54
|
@ -31,7 +31,7 @@ module Stream
|
||||||
begin
|
begin
|
||||||
fd.syswrite(buf)
|
fd.syswrite(buf)
|
||||||
rescue IOError
|
rescue IOError
|
||||||
return 0 if (fd.abortive_close == true)
|
return nil if (fd.abortive_close == true)
|
||||||
|
|
||||||
raise $!
|
raise $!
|
||||||
end
|
end
|
||||||
|
@ -135,6 +135,10 @@ module Stream
|
||||||
# Keep writing until our send length drops to zero
|
# Keep writing until our send length drops to zero
|
||||||
while (send_len > 0)
|
while (send_len > 0)
|
||||||
curr_len = timed_write(send_buf, wait, opts)
|
curr_len = timed_write(send_buf, wait, opts)
|
||||||
|
|
||||||
|
# If the write operation failed due to an IOError, then we fail.
|
||||||
|
return buf.length - send_len if (curr_len == nil)
|
||||||
|
|
||||||
send_len -= curr_len
|
send_len -= curr_len
|
||||||
send_buf.slice!(0, curr_len)
|
send_buf.slice!(0, curr_len)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue