« Return to Thread: TUTORIAL AND ABORT METHOD

TUTORIAL AND ABORT METHOD

by Joan Ventus Proxy :: Rate this Message:

Reply to Author | View in Thread

Hello Oleg,

 

I’ve read the tutorial, and it’s OK for me.

 

Just one question (important, I think) about connection release. I’ve
compared what your tutorial says about this, and the web.

 

In H4 website, one can see the following:

// In case of an IOException the connection will be released
// back to the connection manager automatically

 

But your tutorial says that always we get an exception, we should call the
abort method, but the abort method does not return the connection to the
pool.

 

Then, it seems that the procedure should be:

 

1. If the request/response process finished OK (consuming the content)
--> do nothing (HTTP releases the connection automatically)
2. If an IOException occurs --> do nothing (HTTP releases the
connection automatically)
3. If another exception occurs, call abort method.

 

Is this OK?

 

Thanks,

 

Joan.

 

 « Return to Thread: TUTORIAL AND ABORT METHOD