From bf8dc0762a365302f742da85fa416886332ab73d Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Wed, 19 Jun 2013 10:16:59 +0200 Subject: [PATCH] crypto: change assertion to condition in bio Read head can be the same as write head, even if there's some data to read. --- src/node_crypto_bio.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/node_crypto_bio.cc b/src/node_crypto_bio.cc index adb1e336e9..9afaa3d353 100644 --- a/src/node_crypto_bio.cc +++ b/src/node_crypto_bio.cc @@ -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_; } }