From 50ca13f2928e6598f9a41dd987e75f798bfe4536 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Tue, 6 Feb 2024 16:42:47 +0100 Subject: Cookie + Exports: Store and return the cookie from the underlying context This has the ability so that we can easily get the same cookie back in the client package by creating the one from the context --- exports/exports.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'exports') diff --git a/exports/exports.go b/exports/exports.go index 9c0088e..5c36446 100644 --- a/exports/exports.go +++ b/exports/exports.go @@ -1047,7 +1047,7 @@ func SetTokenHandler(getter C.TokenGetter, setter C.TokenSetter) *C.char { //export CookieNew func CookieNew() C.uintptr_t { c := cookie.NewWithContext(context.Background()) - return C.uintptr_t(cgo.NewHandle(&c)) + return C.uintptr_t(cgo.NewHandle(c)) } // CookieReply replies to a state transition using the cookie -- cgit v1.2.3