File tree 1 file changed +2
-1
lines changed
client/src/main/java/org/asynchttpclient/netty/channel
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 61
61
import java .net .InetSocketAddress ;
62
62
import java .util .Map ;
63
63
import java .util .Map .Entry ;
64
+ import java .util .Objects ;
64
65
import java .util .concurrent .ThreadFactory ;
65
66
import java .util .concurrent .TimeUnit ;
66
67
import java .util .function .Function ;
@@ -490,7 +491,7 @@ public EventLoopGroup getEventLoopGroup() {
490
491
}
491
492
492
493
public ClientStats getClientStats () {
493
- Map <String , Long > totalConnectionsPerHost = openChannels .stream ().map (Channel ::remoteAddress ).filter (a -> a . getClass () == InetSocketAddress . class )
494
+ Map <String , Long > totalConnectionsPerHost = openChannels .stream ().map (Channel ::remoteAddress ).filter (a -> a instanceof InetSocketAddress )
494
495
.map (a -> (InetSocketAddress ) a ).map (InetSocketAddress ::getHostString ).collect (Collectors .groupingBy (Function .identity (), Collectors .counting ()));
495
496
Map <String , Long > idleConnectionsPerHost = channelPool .getIdleChannelCountPerHost ();
496
497
Map <String , HostStats > statsPerHost = totalConnectionsPerHost .entrySet ().stream ().collect (Collectors .toMap (Entry ::getKey , entry -> {
You can’t perform that action at this time.
0 commit comments