diff --git a/application-framework/registration/registration.go b/application-framework/registration/registration.go index e5f2af0467be2fefda063a67899cebd5b77a805c..2c3571b5e9e4ba9950d0e4ac378b00fbf2b7db54 100644 --- a/application-framework/registration/registration.go +++ b/application-framework/registration/registration.go @@ -2,6 +2,7 @@ package registration import ( "context" + "fmt" "time" "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/app" @@ -15,7 +16,12 @@ func Register(ctx context.Context, gosdnAddress, name, token string) (string, er if err != nil { return "", err } - defer conn.Close() + defer func() { + if ferr := conn.Close(); ferr != nil { + fErrString := ferr.Error() + err = fmt.Errorf("InternalError=%w DeferError=%+s", err, fErrString) + } + }() appService := app.NewAppServiceClient(conn)