don't call eof before every read

git-svn-id: file:///home/svn/incoming/trunk@2374 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Matt Miller 2005-04-12 15:13:15 +00:00
parent f43c076313
commit 068dc13284
1 changed files with 8 additions and 2 deletions

View File

@ -55,11 +55,17 @@ class Pool < Rex::Post::Meterpreter::Channel
# Wraps the read operation to raise end-of-file as necessary
def read(length = nil)
if (self.eof)
begin
data = super(length)
rescue
data = nil
end
if ((data == nil) && (self.eof))
raise EOFError
end
return super(length)
return data
end
# Stub for seeking to a different location on the remote half of the