Review 371e60b17c and apply fixes
This commit is contained in:
parent
1eef0ec19c
commit
94fa3fab8c
2 changed files with 6 additions and 7 deletions
|
|
@ -808,13 +808,10 @@ template readIntoExImpl(s: InputStream,
|
|||
let totalBytesDrained = drainBuffersInto(s, dst, dstLen)
|
||||
var bytesDeficit = (dstLen - totalBytesDrained)
|
||||
|
||||
if bytesDeficit > 0:
|
||||
if bytesDeficit > 0 and s.vtable != nil:
|
||||
var adjustedDst = offset(dst, totalBytesDrained)
|
||||
|
||||
while true:
|
||||
if s.vtable.isNil():
|
||||
break
|
||||
|
||||
let newBytesRead = awaiter s.vtable.readOp(s, adjustedDst, bytesDeficit)
|
||||
|
||||
s.spanEndPos += newBytesRead
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue