ReOSSClient实例使用完后需要调用shutdown方法吗
如果调用shutdown方法, 会抛出线程异常. 看了OSSClient其他的方法, 找不到关闭或者回收连接的, 看debug日志, 会发现每隔60秒, new 过多少个client就有多少条关闭的记录, 关键是关不掉. 下面是我new了2个client, 然后断点停住的日志输出:
2015-09-09 15:43:50,505 DEBUG [org.apache.http.impl.conn.PoolingClientConnectionManager] - <Closing connections idle longer than 60 SECONDS>
2015-09-09 15:44:50,506 DEBUG [org.apache.http.impl.conn.PoolingClientConnectionManager] - <Closing connections idle longer than 60 SECONDS>
2015-09-09 15:44:50,506 DEBUG [org.apache.http.impl.conn.PoolingClientConnectionManager] - <Closing connections idle longer than 60 SECONDS>
2015-09-09 15:45:50,507 DEBUG [org.apache.http.impl.conn.PoolingClientConnectionManager] - <Closing connections idle longer than 60 SECONDS>
2015-09-09 15:45:50,507 DEBUG [org.apache.http.impl.conn.PoolingClientConnectionManager] - <Closing connections idle longer than 60 SECONDS>
2015-09-09 15:46:50,508 DEBUG [org.apache.http.impl.conn.PoolingClientConnectionManager] - <Closing connections idle longer than 60 SECONDS>
2015-09-09 15:46:50,508 DEBUG [org.apache.http.impl.conn.PoolingClientConnectionManager] - <Closing connections idle longer than 60 SECONDS>
2015-09-09 15:47:50,509 DEBUG [org.apache.http.impl.conn.PoolingClientConnectionManager] - <Closing connections idle longer than 60 SECONDS>
2015-09-09 15:47:50,509 DEBUG [org.apache.http.impl.conn.PoolingClientConnectionManager] - <Closing connections idle longer than 60 SECONDS>
2015-09-09 15:48:50,509 DEBUG [org.apache.http.impl.conn.PoolingClientConnectionManager] - <Closing connections idle longer than 60 SECONDS>
2015-09-09 15:48:50,509 DEBUG [org.apache.http.impl.conn.PoolingClientConnectionManager] - <Closing connections idle longer than 60 SECONDS>
2015-09-09 15:49:50,510 DEBUG [org.apache.http.impl.conn.PoolingClientConnectionManager] - <Closing connections idle longer than 60 SECONDS>
2015-09-09 15:49:50,510 DEBUG [org.apache.http.impl.conn.PoolingClientConnectionManager] - <Closing connections idle longer than 60 SECONDS>