http - httpclient hard timout not working properly -


i using closeablehttpasyncclient perform number of requests without waiting other complete , setting hard timout of 1 minute. if suppose there 10 requests taking 4-5 minutes stop.

requestconfig requestconfig = requestconfig.custom()             .setsockettimeout(3000)             .setconnectionrequesttimeout(3000)             .setconnecttimeout(3000).build();     closeablehttpasyncclient httpclient = httpasyncclients.custom()             .setdefaultrequestconfig(requestconfig)             .build();   timertask task = new timertask() {                 @override                 public void run() {                     if (request != null) {                         request.abort();                         system.out.println( "request aborted");                     }                 }               };             new timer(true).schedule(task, hardtimeout * 10000); 

please tell me whats wrong in this.


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -