BSecureSocket: Treat SSL-zero-return as B_IO_ERROR

Somehow B_CANCELED doesn't seem to convey the correct
meaning. Using B_IO_ERROR will also fit to the recent
changes in the Package Kit and will trigger a re-try of
package downloads.

Change-Id: I58c4d4faa705e6519e0ff9ec7c4654a6151e5486
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3635
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
Stephan Aßmus
2021-01-16 16:32:32 +00:00
committed by Adrien Destugues
parent 648fdf2310
commit 60c165a53c
+1 -1
View File
@@ -199,7 +199,7 @@ BSecureSocket::Private::ErrorCode(int returnValue)
return B_NO_ERROR;
case SSL_ERROR_ZERO_RETURN:
// Socket is closed
return B_CANCELED;
return B_IO_ERROR;
case SSL_ERROR_SSL:
// Probably no certificate
return B_NOT_ALLOWED;