mirror of https://github.com/aria2/aria2
WinTLS: Fix potential infinite loop
parent
52c68c431d
commit
925b5cec07
|
@ -250,7 +250,10 @@ int WinTLSSession::closeConnection()
|
|||
// Send remaining data.
|
||||
while (writeBuf_.size()) {
|
||||
int rv = writeData(nullptr, 0);
|
||||
if (rv == TLS_ERR_WOULDBLOCK) {
|
||||
if (rv == 0) {
|
||||
break;
|
||||
}
|
||||
if (rv < 0) {
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue