Fix bug that Gene found in greenpipe.
This commit is contained in:
@@ -416,7 +416,7 @@ class GreenPipe(object):
|
|||||||
chunk, self.recvbuffer = buf[:found], buf[found:]
|
chunk, self.recvbuffer = buf[:found], buf[found:]
|
||||||
return chunk
|
return chunk
|
||||||
checked = max(0, len(buf) - (len(terminator) - 1))
|
checked = max(0, len(buf) - (len(terminator) - 1))
|
||||||
d = self.fd.read(BUFFER_SIZE)
|
d = self.read(BUFFER_SIZE)
|
||||||
if not d:
|
if not d:
|
||||||
break
|
break
|
||||||
buf += d
|
buf += d
|
||||||
@@ -428,7 +428,7 @@ class GreenPipe(object):
|
|||||||
chunk, self.recvbuffer = buf[:found], buf[found:]
|
chunk, self.recvbuffer = buf[:found], buf[found:]
|
||||||
return chunk
|
return chunk
|
||||||
checked = len(buf)
|
checked = len(buf)
|
||||||
d = self.fd.read(BUFFER_SIZE)
|
d = self.read(BUFFER_SIZE)
|
||||||
if not d:
|
if not d:
|
||||||
break
|
break
|
||||||
buf += d
|
buf += d
|
||||||
|
Reference in New Issue
Block a user