On 30 August 2011 21:06, sebb <[email protected]> wrote: > The method DefaultHttpRequestRetryHandler.retryRequest currently > retries IOExceptions which are not: > > InterruptedIOException > UnknownHostException > ConnectException > SSLException > > However, this includes exceptions such as the following: > > org.apache.http.impl.client.DefaultHttpClient: I/O exception > (java.net.SocketException) caught when processing request: socket > closed > org.apache.http.impl.client.DefaultHttpClient: Retrying request > > and > > org.apache.http.impl.client.DefaultHttpClient: I/O exception > (java.net.BindException) caught when connecting to the target host: > Address already in use: connect > org.apache.http.impl.client.DefaultHttpClient: Retrying connect > > which seems wrong (but perhaps I am wrong). > > I discovered this because JMeter currently uses Socket.close() to > interrupt an active sample. Probably there is a better way to do this.
Sorry, that's misleading - JMeter uses HttpUriRequest.abort() which presumably uses Socket.close() internally, judging by the log messages. In fact, looking at the code for abort(), that sets the boolean aborted, but nothing seems to use the flag, as I could not find any references to the method isAborted(). Presumably the code in DefaultHttpRequestRetryHandler.retryRequest() - or perhaps DefaultRequestDirector.tryExecute() - ought to take that into account? Is there perhaps other code that needs to check isAborted()? --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
