diff --git a/src/main/kotlin/io/libp2p/etc/util/P2PService.kt b/src/main/kotlin/io/libp2p/etc/util/P2PService.kt index 0c712ce14..f48f05b50 100644 --- a/src/main/kotlin/io/libp2p/etc/util/P2PService.kt +++ b/src/main/kotlin/io/libp2p/etc/util/P2PService.kt @@ -166,8 +166,8 @@ abstract class P2PService( } protected open fun streamDisconnected(stream: StreamHandler) { - val peerHandler = stream.getPeerHandler() if (stream.aborted) return + val peerHandler = stream.getPeerHandler() activePeersMutable -= peerHandler if (peersMutable.remove(peerHandler)) { onPeerDisconnected(peerHandler)