aboutsummaryrefslogtreecommitdiffstats
path: root/sources/hv-collector-server/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/networking.kt
diff options
context:
space:
mode:
Diffstat (limited to 'sources/hv-collector-server/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/networking.kt')
-rw-r--r--sources/hv-collector-server/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/networking.kt5
1 files changed, 3 insertions, 2 deletions
diff --git a/sources/hv-collector-server/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/networking.kt b/sources/hv-collector-server/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/networking.kt
index eb51cf4b..6bbe08f0 100644
--- a/sources/hv-collector-server/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/networking.kt
+++ b/sources/hv-collector-server/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/networking.kt
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* dcaegen2-collectors-veshv
* ================================================================================
- * Copyright (C) 2019 NOKIA
+ * Copyright (C) 2019-2020 NOKIA
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,6 +31,7 @@ import reactor.netty.Connection
import reactor.netty.NettyInbound
import reactor.netty.NettyOutbound
import java.net.InetAddress
+import java.net.InetSocketAddress
import java.security.cert.X509Certificate
import javax.net.ssl.SSLSession
@@ -76,6 +77,6 @@ internal inline fun withNewClientContextFrom(nettyInbound: NettyInbound,
internal fun populateClientContextFromInbound(clientContext: ClientContext, nettyInbound: NettyInbound) =
withConnectionFrom(nettyInbound) { connection ->
- clientContext.clientAddress = Try { connection.address().address }.toOption()
+ clientContext.clientAddress = Try { (connection.address() as InetSocketAddress).address }.toOption()
clientContext.clientCert = connection.getSslSession().flatMap { it.findClientCert() }
}