Mark- 29 Posted December 16, 2020 (edited) Hello, THttpCli version 8.62 Update: Thinking about it "blocking" is what the code says and what it does. I switched to CloseAsync and that seems to solve the issue. More testing will prove. Is there a better idea? I have a THttpCli component on a TDataModule connected to a camera. When the user closes the main form, I call: HttpCli1.Abort; HttpCli1.Close; Abort returns and Close is called. Close never returns because: if MsgWaitForMultipleObjects(0, Pointer(nil)^, FALSE, 1000, QS_ALLINPUT) = WAIT_OBJECT_0 then MessagePump; is called, and MessagePump calls: Application.ProcessMessages; Ideas? Thanks, Mark Edited December 17, 2020 by Mark- Share this post Link to post
FPiette 385 Posted December 17, 2020 When closing the main form, that is closing the application, it is enough to call Abort. And if you really want to call Close, don't call Abort just before. Calling Abort will do a hard close of the TCP session, without waiting the remote side to acknowledge (It will trigger an error there). Calling close will do an orderly close (No error at remote side). A web server, even in a camera should not care about hard close. Share this post Link to post