don't call eof before every read
git-svn-id: file:///home/svn/incoming/trunk@2374 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
f43c076313
commit
068dc13284
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue