When is it safe to call TIdTCPConnection.Disconnect?
===

I have a `h: TIdHTTP` component in a secondary thread and it's retrieving headers from a URL. At the same time user clicks cancel and the main thread tries to actually disconnect the `Indy` component. Is it safe to call `thrd.h.Disconnect`  from the main thread? (while `h:TIdHTTP` is declared as public so is accessible within the main thread)

If it is safe at anytime, may I write a `Cancel` function in the thread that can be called directly by the main thread?

Thanks in advance