mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 16:49:20 +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
|
begin
|
||||||
P:=PByte(@Buffer);
|
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
|
if Result<0 then
|
||||||
Result:=-1;
|
Result:=-1;
|
||||||
end;
|
end;
|
||||||
@ -600,7 +602,9 @@ Var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
P:=PByte(@Buffer);
|
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
|
if Result<0 then
|
||||||
Result:=-1;
|
Result:=-1;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user