listenspec: Make GetListenSpec return a copy of the listenspec in
the context.
Change-Id: I7d7bfb548bcc4fe80f9fc403d7d641d51c3be17c
diff --git a/profiles/internal/rt/runtime.go b/profiles/internal/rt/runtime.go
index 6a4a8db..beaf61b 100644
--- a/profiles/internal/rt/runtime.go
+++ b/profiles/internal/rt/runtime.go
@@ -433,7 +433,7 @@
func (*Runtime) GetListenSpec(ctx *context.T) rpc.ListenSpec {
listenSpec, _ := ctx.Value(listenSpecKey).(*rpc.ListenSpec)
- return *listenSpec
+ return listenSpec.Copy()
}
func (*Runtime) SetBackgroundContext(ctx *context.T) *context.T {