Open
Description
Hi,
Thanks for the code.
I find a bug when I call multiple executeRequest(httpget) in a process.
The code not responding in response = httpclient.execute(request);
This happens because the connection does not close when an error occurs.
Solution:
Its neccesary put in catch response.close() in method get();
Example:
HttpGet httpget = new HttpGet(completeUrl);
try{
HashMap<String,Object> resoult = this.executeRequest(httpget);
}
catch(Exception ex){
try {
response.close();
throw new PrestaShopWebServiceException("Bad HTTP response : "+ex.toString());
} catch (IOException ex1) {
throw new PrestaShopWebServiceException("Bad HTTP response : "+ex1.toString());
}
}
Metadata
Metadata
Assignees
Labels
No labels