IPv6 support for REST Server 37/7037/1 e-release v0.9.8
authorwahidw <abdulwahid.w@nokia.com>
Fri, 12 Nov 2021 03:37:35 +0000 (03:37 +0000)
committerwahidw <abdulwahid.w@nokia.com>
Fri, 12 Nov 2021 03:37:35 +0000 (03:37 +0000)
Signed-off-by: wahidw <abdulwahid.w@nokia.com>
Change-Id: Iea5dd2cfe9e7e5eb5d3b585312128c9c53f1198d

pkg/xapp/xapp.go

index e832436..7ac0c2f 100755 (executable)
@@ -305,7 +305,7 @@ func RunWithParams(c MessageConsumer, sdlcheck bool) {
        if ipString == "<nil>" {
                host = fmt.Sprintf(":%d", GetPortData("http").Port)
        } else {
        if ipString == "<nil>" {
                host = fmt.Sprintf(":%d", GetPortData("http").Port)
        } else {
-               host = fmt.Sprintf("%s:%d", ipString, GetPortData("http").Port)
+               host = fmt.Sprintf("[%s]:%d", ipString, GetPortData("http").Port)
        }
        go http.ListenAndServe(host, Resource.router)
        Logger.Info(fmt.Sprintf("Xapp started, listening on: %s", host))
        }
        go http.ListenAndServe(host, Resource.router)
        Logger.Info(fmt.Sprintf("Xapp started, listening on: %s", host))