protected boolean closeAtomically ( ) { if ( isClosed . compareAndSet ( false , true ) ) { Closeable . closeQuietly ( networkStatsListener ) ; return true ; } else { //was already closed. return false ; } }
Close the connection atomically .