mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
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:
1 parent
7373c4ddb7
commit
bf8dc0762a
1 file changed
+1
-2
@@ -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_;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user