Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
No replies
GWV5_Patrick_Joseph_McKenna
1 Post
ACCEPTED ANSWER

Pinned topic Long delay closing connections

‏2012-05-29T09:32:15Z |
Dear all,

It seems that closing a connection after a HTTPS GET causes a delay in the order of 3-5 seconds usually.
I have the following code in a static utility method:


... Calendar before = GregorianCalendar.getInstance(); System.out.println( 
"### Going to send at "+ before.getTimeInMillis() + 
"ms"); ret = conn.send(); Calendar after = GregorianCalendar.getInstance(); System.out.println( 
"### ResponseStatus "+ret.getResponseStatus() + 
" at " + after.getTimeInMillis() + 
"ms"); System.out.println( 
"### ResponseStatus "+ conn.getConnectionState()+ 
" after " + (after.getTimeInMillis() - before.getTimeInMillis()) + 
"ms"); conn.close(); Calendar afterClose = GregorianCalendar.getInstance(); System.out.println( 
"### ResponseStatus closed connection "+conn.getConnectionState()+ 
" at " + afterClose.getTimeInMillis() + 
"ms"); ...

The output is:

### ResponseStatus 200 at 1338282835535ms ### ResponseStatus CONNECTED after 14792ms ### ResponseStatus closed connection CLOSED at 1338282841291ms


It seems that closing the connection takes 5756ms, which is a lot.

Is there something I am doing wrong?

Is there any way I can get the Smash source code?

Thanks!