________________________________________
From: Oleg Kalnichevski [[email protected]]
Sent: Saturday, May 03, 2014 7:52 AM
To: HttpClient User Discussion
Subject: Re: Cancelling an httpclient-asynch put

On Fri, 2014-05-02 at 16:23 +0000, Boxer, Aaron wrote:
> Hello List,
>
> What is the best way of cancelling an httpclient-asynch put ?
>
> Currently, I am issuing a cancel(true) on the Future I receive back from the 
> put call.
>
> But, if I am sending large files, then requests that are in the middle of 
> sending are not cancelled.
> I would like to stop all network activity as soon as possible.
>
> Is there a way of forcing the client to abort these connections ?
>

Simply throw an exception either from request producer or response
consumer. That will immediately terminate the ongoing HTTP message
exchange and shut down the underlying connection.

Oleg



Thanks so much, Oleg.  Is it odd that calling shutdown on the connection 
manager does not
shut down the underlying connection?   As I mentioned in previous email, 
connection continues
even if I exit my program.

Aaron




This e-mail may contain confidential and/or privileged information for the sole 
use of the intended recipient. 
Any review or distribution by anyone other than the person for whom it was 
originally intended is strictly prohibited. 
If you have received this e-mail in error, please contact the sender and delete 
all copies. 
Opinions, conclusions or other information contained in this e-mail may not be 
that of the organization.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to