Now it's OK. All works

The fault with Delphi in Linux was something about FMXLinux (the application layer in Linux for Delphi, based on GTK3) with the two applications. Alone they works, together they crashed (one or the other).
Now I ported the server part to pure console and everything is working perfectly, nothing crashes.
I update in some minutes and attach here the project (only two source 'cause it was in Delphi). May be some adjustement in FPC to compile.
Take care:
The client should have the TIMER -> NOT ACTIVE by default !!!, until the end of FormCreate event.
And that part of code should be modified in client application (timer event):
procedure TForm1.Timer1Timer(Sender: TObject);
var s : String;
begin
Log('Enter');
Timer1.Enabled := false;
//Do not trust on ConnectionEstablished use IdTCPClient1.Connected
if not IdTCPClient1.Connected then
try
Log('Try Connection');
IdTCPClient1.Connect(ServerIP, 15577);
except
Log('Except on connection');
//Doesn't need that
//IdTCPClient1.Disconnect;
Timer1.enabled := true;
exit;
end;
//Do not trust on ConnectionEstablished use IdTCPClient1.Connected
if IdTCPClient1.Connected then
try
Log('Send');
IdTCPClient1.IOHandler.WriteLn('Hello');
IdTCPClient1.Disconnect; // this will crash the server if ssl enabled;
//This will LOCK the CLIENT, if you don't use timeout
if IdTCPClient1.Connected then
begin
Log('Read');
s := IdTCPClient1.IOHandler.ReadLn(sLineBreak,1000) ;
Memo1.Lines.Add(s);
end;
except on e:exception do
Log('exception on block');
end;
Timer1.enabled := true;
Log('Exit');
end;