@@ -38,7 +38,7 @@ public class TimeoutsHolder {
3838private volatile NettyResponseFuture <?>nettyResponseFuture ;
3939public final Timeout requestTimeout ;
4040public volatile Timeout readTimeout ;
41- private volatile String remoteAddress = "not-connected" ;
41+ private volatile InetSocketAddress remoteAddress ;
4242
4343public TimeoutsHolder (Timer nettyTimer ,NettyResponseFuture <?>nettyResponseFuture ,NettyRequestSender requestSender ,AsyncHttpClientConfig config ) {
4444this .nettyTimer =nettyTimer ;
@@ -61,7 +61,7 @@ public TimeoutsHolder(Timer nettyTimer, NettyResponseFuture<?> nettyResponseFutu
6161 }
6262
6363public void initRemoteAddress (InetSocketAddress address ) {
64- remoteAddress =address . toString () ;
64+ remoteAddress =address ;
6565 }
6666
6767public void startReadTimeout () {
@@ -77,8 +77,7 @@ void startReadTimeout(ReadTimeoutTimerTask task) {
7777// first call triggered from outside (else is read timeout is re-scheduling itself)
7878task =new ReadTimeoutTimerTask (nettyResponseFuture ,requestSender ,this ,readTimeoutValue );
7979 }
80- Timeout readTimeout =newTimeout (task ,readTimeoutValue );
81- this .readTimeout =readTimeout ;
80+ this .readTimeout =newTimeout (task ,readTimeoutValue );
8281
8382 }else if (task !=null ) {
8483// read timeout couldn't re-scheduling itself, clean up
@@ -104,6 +103,6 @@ private Timeout newTimeout(TimerTask task, long delay) {
104103 }
105104
106105String remoteAddress () {
107- return remoteAddress ;
106+ return remoteAddress == null ? "not-connected" : remoteAddress . toString () ;
108107 }
109108}