LNet - TLTcp in a thread locks whole application. lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- blankname · 2020-08-10 14:22 I hav some code I want to use in a plugin for external application. The thing is, when I use TThread (TServerHandlerThread), and put some infinite loop, then the application does not respond - only the code of the TServerHandlerThread thread works. Is there any way to make it work? The plugin will be used in X-Plane 11 simulator.Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TServerHandlerThread.Execute;begin  FCon := TLTcp.Create(nil);  FCon.OnError := @OnEr;  FCon.OnReceive := @OnRe;  FCon.OnDisconnect := @OnDs;  FCon.OnAccept := @OnAc;  FCon.Timeout := 100;  FCon.ReuseAddress := True;   if FCon.Listen(30123) then begin    repeat      FCon.Callaction;      Sleep(100);    until Quit;  end;   FCon.Free;end; ---------------------------------------------------------------------- blankname · 2020-08-10 14:24 The network code works partially - server sends and receives packets. ---------------------------------------------------------------------- blankname · 2020-08-10 14:38 Problem solved - I ran the thread with .Execute instead of .Start ---------------------------------------------------------------------- cdbc · 2020-08-11 18:52 Uuuhhmmm, doesn't that mean, you're running in the main thread?!? Just wondering... edit: Oh, now i get it  Regards Benny