12-21-2020, 05:42 AM
Hi,
What is the correct way to cancel file uploads using TIdHTTP.Post I believe FTP has Abort function but not HTTP.
I have the http request in side a thread syncing with UI normally But when I try to call Disconnect function in the middle of the upload I get this error: "Socket Error #10038 socket operation on non-socket".
When I use the request in a thread as i said the error does not show up. But when I use in the main thread with Antifreeze component on form the error shows up. How can I close the connection without causing any errors on client or server (As I develop both).
I also tried IOHandler.CloseGracefully but also caused a message to be shown that connection is closed gracefully.
Is there a silent way to do this?
Thanks in advance.
What is the correct way to cancel file uploads using TIdHTTP.Post I believe FTP has Abort function but not HTTP.
I have the http request in side a thread syncing with UI normally But when I try to call Disconnect function in the middle of the upload I get this error: "Socket Error #10038 socket operation on non-socket".
When I use the request in a thread as i said the error does not show up. But when I use in the main thread with Antifreeze component on form the error shows up. How can I close the connection without causing any errors on client or server (As I develop both).
I also tried IOHandler.CloseGracefully but also caused a message to be shown that connection is closed gracefully.
Is there a silent way to do this?
Thanks in advance.