WinTLS: Check return value

pull/1107/head
Tatsuhiro Tsujikawa 2018-01-04 19:58:01 +09:00
parent c882ae3d9c
commit 4bd6b68d59
1 changed files with 4 additions and 2 deletions

View File

@ -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;
} }
} }