04-11-2021, 01:34 PM
So, I have tested the changed with “SourceIsAvailable()”, and it works! I canceled after 1200000 rounds.
Here are the changes:
Back to the original implementation.
function TIdSSLIOHandlerSocketOpenSSL.Readable(AMSec: Integer = IdTimeoutDefault): Boolean;
begin
if not fPassThrough then
begin
Result := (ssl_pending(fSSLSocket.fSSL) > 0);
if Result then Exit;
end;
Result := inherited Readable(AMSec);
end;
New.
definition
protected
function TIdSSLIOHandlerSocketOpenSSL.SourceIsAvailable: Boolean; override;
implementation
function TIdSSLIOHandlerSocketOpenSSL.SourceIsAvailable: Boolean;
begin
Result:=Assigned(fSSLSocket) and inherited SourceIsAvailable;
end;
that's all.
Thanks for support.
Here are the changes:
Back to the original implementation.
function TIdSSLIOHandlerSocketOpenSSL.Readable(AMSec: Integer = IdTimeoutDefault): Boolean;
begin
if not fPassThrough then
begin
Result := (ssl_pending(fSSLSocket.fSSL) > 0);
if Result then Exit;
end;
Result := inherited Readable(AMSec);
end;
New.
definition
protected
function TIdSSLIOHandlerSocketOpenSSL.SourceIsAvailable: Boolean; override;
implementation
function TIdSSLIOHandlerSocketOpenSSL.SourceIsAvailable: Boolean;
begin
Result:=Assigned(fSSLSocket) and inherited SourceIsAvailable;
end;
that's all.
Thanks for support.