mirror of https://github.com/aria2/aria2
WinTLS: Check return value
parent
c882ae3d9c
commit
4bd6b68d59
|
@ -213,8 +213,10 @@ int WinTLSSession::closeConnection()
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Alright data is sent or buffered
|
// Ignore error here because we probably don't handle those
|
||||||
if (rv - len != 0) {
|
// errors gracefully. Just shutdown connection. If rv is
|
||||||
|
// positive, then data is sent or buffered
|
||||||
|
if (rv > 0 && rv - len != 0) {
|
||||||
return TLS_ERR_WOULDBLOCK;
|
return TLS_ERR_WOULDBLOCK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue