mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-05 13:58:33 +02:00
* Fix by Dokkie8844 to treat error codes by GnuTLS in a more graceful manner. Fixes issue #40195
This commit is contained in:
parent
6941409295
commit
8e024b2606
@ -588,7 +588,9 @@ Var
|
||||
|
||||
begin
|
||||
P:=PByte(@Buffer);
|
||||
Result:=Check(gnutls_record_send(Fsession,P,Count));
|
||||
repeat
|
||||
Result:=Check(gnutls_record_send(FSession,P,Count));
|
||||
until (Result <> GNUTLS_E_AGAIN) and (Result <> GNUTLS_E_INTERRUPTED);
|
||||
if Result<0 then
|
||||
Result:=-1;
|
||||
end;
|
||||
@ -600,7 +602,9 @@ Var
|
||||
|
||||
begin
|
||||
P:=PByte(@Buffer);
|
||||
Result:=Check(gnutls_record_recv(FSession,P,Count));
|
||||
repeat
|
||||
Result:=Check(gnutls_record_recv(FSession,P,Count));
|
||||
until (Result <> GNUTLS_E_AGAIN) and (Result <> GNUTLS_E_INTERRUPTED);
|
||||
if Result<0 then
|
||||
Result:=-1;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user