Skip to content

Commit bf8dc07

Browse files
committed
crypto: change assertion to condition in bio
Read head can be the same as write head, even if there's some data to read.
1 parent 7373c4d commit bf8dc07

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/node_crypto_bio.cc

+1-2
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,7 @@ size_t NodeBIO::Read(char* out, size_t size) {
209209
read_head_->write_pos_ = 0;
210210

211211
// But not get beyond write_head_
212-
if (length_ != bytes_read) {
213-
assert(read_head_ != write_head_);
212+
if (length_ != bytes_read && read_head_ != write_head_) {
214213
read_head_ = read_head_->next_;
215214
}
216215
}

0 commit comments

Comments
 (0)