Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Indy TcpSSLServer crashes several times
#1
Hello,


My Indy TcpSSLServer crashes several times. I made a test solution with 1 Server and 5 Clients. Every client has 10 Threads. Each Thread connects, transmits, receives and closes the socket every 2 seconds. After 100000 – 200000 connects, the Server crashes with a memory access error. I found the access error in “IdSSLOpenSSL.pas” in “function TidSSLIOHandlerSocketOpenSSL.Readable”. The SocketClass
“fSSLSocket” was nil. Why? I don’t know.


I changed the source and it works.

function TIdSSLIOHandlerSocketOpenSSL.Readable(AMSec: Integer = IdTimeoutDefault): Boolean;
begin
if not fPassThrough then
begin
// Result := (ssl_pending(fSSLSocket.fSSL) > 0); //Original implementation
Result := Assigned(fSSLSocket) and (ssl_pending(fSSLSocket.fSSL) > 0);
if Result then Exit;
end;
Result := inherited Readable(AMSec);
end;


maybe that will help the users too Smile


My system:
Linux: x86_64
Lazarus: 2.0.10
FPC: 3.2.0
Indy: 10.6.2
Reply


Messages In This Thread
Indy TcpSSLServer crashes several times - by fpctuxe - 04-09-2021, 06:47 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)