diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2024-02-06 16:42:47 +0100 |
|---|---|---|
| committer | Jeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com> | 2024-02-19 14:15:07 +0100 |
| commit | 50ca13f2928e6598f9a41dd987e75f798bfe4536 (patch) | |
| tree | 75c9f06c36bf2661007aeb9f0e5a01a3554abf56 /exports | |
| parent | a84050a5e93f5fb9f5bbb79ca21b37e8359cf289 (diff) | |
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
Diffstat (limited to 'exports')
| -rw-r--r-- | exports/exports.go | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
