Moved exception back to calling function

git-svn-id: file:///home/svn/incoming/trunk@2854 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2005-09-16 07:50:04 +00:00
parent 8c1fc64517
commit dfd39f1b19
1 changed files with 6 additions and 12 deletions

View File

@ -112,12 +112,9 @@ module Stream
#
def timed_write(buf, wait = def_write_timeout, opts = {})
if (wait and wait > 0)
begin
timeout(wait) {
return write(buf, opts)
}
rescue Timeout::Error
end
timeout(wait) {
return write(buf, opts)
}
else
return write(buf, opts)
end
@ -128,12 +125,9 @@ module Stream
#
def timed_read(length = nil, wait = def_read_timeout, opts = {})
if (wait and wait > 0)
begin
timeout(wait) {
return read(length, opts)
}
rescue Timeout::Error
end
timeout(wait) {
return read(length, opts)
}
else
return read(length, opts)
end