Closed MathiasKoch closed 1 month ago
I can't say I understand this, but as long as the tests pass I'm fine with the changes.
The short version of what it does is, that prior to this the read pointer in self.decoded
was incremented when reading the record header initially, after which we had an await point to read additional data, whereas now we make sure to read all data before incrementing the read pointer.
This mean that if the future is dropped in between the two calls to advance, we will simply just attempt the full record again next time.
The only downside is that the
ensure_contiguous
function now needs to move the header as well, so there might be a 5 byte overhead in the required TLS RX buffer size.Fixes #142