jenkinsci / java-client-api

A Jenkins API client for Java
MIT License
901 stars 470 forks source link

http unrelease when request return unsuccessful #334

Open yxot12 opened 6 years ago

yxot12 commented 6 years ago

when i try to create a project using function createJob() , if there already have a job has the same name with the new job,the http response code would be 400 bad request,then the httpResponseValidator.validateResponse() would thrown exception . at this time ,the http connection will not be release because the try-catch statement don't include the validateResponse function. after 2times failed (the initial pool size ),the connection pool don't have any new connection to use, the leaseConnection() in the PoolingHttpClientConnectionManager would hang