crypto: change assertion to condition in bio
Read head can be the same as write head, even if there's some data to read.
This commit is contained in:
parent
7373c4ddb7
commit
bf8dc0762a
@ -209,8 +209,7 @@ size_t NodeBIO::Read(char* out, size_t size) {
|
||||
read_head_->write_pos_ = 0;
|
||||
|
||||
// But not get beyond write_head_
|
||||
if (length_ != bytes_read) {
|
||||
assert(read_head_ != write_head_);
|
||||
if (length_ != bytes_read && read_head_ != write_head_) {
|
||||
read_head_ = read_head_->next_;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user