mirror of https://github.com/aria2/aria2
WinTLS: Return 0 if eof_ is true and decBuf_ is empty
parent
83c78c497b
commit
04f875e273
|
@ -559,6 +559,10 @@ ssize_t WinTLSSession::readData(void* data, size_t len)
|
|||
|
||||
len = std::min(decBuf_.size(), len);
|
||||
if (len == 0) {
|
||||
if (eof_) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return TLS_ERR_WOULDBLOCK;
|
||||
}
|
||||
memcpy(data, decBuf_.data(), len);
|
||||
|
|
Loading…
Reference in New Issue