y2nd66 3 Posted March 20, 2021 Is it possible to use GetAsync from another Thread than main? Or is it that your design logic is not for that? I try to Get a document every second from another Thread and it works fine, but GetAsync does nothing. Get do this: 09:23:15:125am|State = httpNotConnected 09:23:15:126am|Login www.tuenvio.cu 09:23:15:126am|State = httpDnsLookup 09:23:15:201am|Socket DNS Lookup Done - 181.225.247.68,181.225.247.69 09:23:15:201am|Alternate Address: 181.225.247.68 09:23:15:201am|State = httpDnsLookupDone 09:23:15:201am|connect to 181.225.247.68/443 09:23:15:201am|03203960 Socket handle created handle=1144 09:23:15:201am|TWSocket will connect to 181.225.247.68:443 09:23:15:338am|SessionConnected, error=0 to 181.225.247.68:443 ... GetAsync only this: 09:35:46:791am|State = httpNotConnected 09:35:46:791am|Login www.tuenvio.cu 09:35:46:791am|State = httpDnsLookup Thanks. Share this post Link to post
Angus Robertson 574 Posted March 20, 2021 You need a message handler in the thread execute loop, to handle all the events, these lines are from TMailQuThread.Execute; in OverbyteIcsMailQueue.pas. FIcsWndControl.ProcessMessages ; if FIcsWndControl.Terminated then break ; if NOT FActive then break ; // component if Terminated then break ; // thread if (errorcounter > 10000) then break ; // sanity check Angus Share this post Link to post