Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TIdTelnet Disconnect
#5
(11-18-2019, 02:18 PM)omarreis Wrote: I tried: 
  IdTelnet1.IOHandler.Close;
instead of:
  IdTelnet1.Disconnect;

(calls from the UI thread)

That fixed the app blocking problem, but the component no longer called IdTelnet1.Disconnected event, which I use.

You shouldn't be using the OnDisconnected event to begin with. Indy clients are not event driven. The OnDisconnected is only called when Disconnect() is called, so you could have (and should have) simply run your OnDisconnected logic right after calling Disconnect().

In any case, if you really need an event, have a look at the OnStatus event, it has an hsDisconnected notification.

Reply


Messages In This Thread
TIdTelnet Disconnect - by omarreis - 11-15-2019, 01:03 PM
RE: TIdTelnet Disconnect - by kudzu - 11-15-2019, 06:49 PM
RE: TIdTelnet Disconnect - by rlebeau - 11-16-2019, 07:54 PM
RE: TIdTelnet Disconnect - by omarreis - 11-18-2019, 02:18 PM
RE: TIdTelnet Disconnect - by rlebeau - 11-22-2019, 02:52 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)