04-12-2021, 06:33 PM
(04-11-2021, 01:34 PM)fpctuxe Wrote: function TIdSSLIOHandlerSocketOpenSSL.SourceIsAvailable: Boolean;
begin
Result:=Assigned(fSSLSocket) and inherited SourceIsAvailable;
end;
I was thinking more along the lines of:
Code:
function TIdSSLIOHandlerSocketOpenSSL.SourceIsAvailable: Boolean;
begin
if not fPassThrough then
begin
Result := (fSSLSocket <> nil);
if not Result then Exit;
end;
Result := inherited SourceIsAvailable;
end;
Or:
Code:
function TIdSSLIOHandlerSocketOpenSSL.SourceIsAvailable: Boolean;
begin
if (fPassThrough or (fSSLSocket <> nil)) and inherited SourceIsAvailable;
end;