From e193df3bc721dab724a3de48a41226e63648817c Mon Sep 17 00:00:00 2001 From: Pascal Fischer Date: Sat, 4 Nov 2023 19:46:47 +0100 Subject: [PATCH] fix metadata send on startup --- client/ios/NetBirdSDK/client.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/ios/NetBirdSDK/client.go b/client/ios/NetBirdSDK/client.go index ca87c05f4..c5580c8d6 100644 --- a/client/ios/NetBirdSDK/client.go +++ b/client/ios/NetBirdSDK/client.go @@ -141,6 +141,8 @@ func (c *Client) GetManagementStatus() bool { func (c *Client) IsLoginRequired() bool { var ctx context.Context ctxWithValues := context.WithValue(context.Background(), system.DeviceNameCtxKey, c.deviceName) + ctxWithValues = context.WithValue(ctxWithValues, system.OsNameCtxKey, c.osName) + ctxWithValues = context.WithValue(ctxWithValues, system.OsVersionCtxKey, c.osVersion) c.ctxCancelLock.Lock() defer c.ctxCancelLock.Unlock() ctx, c.ctxCancel = context.WithCancel(ctxWithValues) @@ -156,6 +158,8 @@ func (c *Client) IsLoginRequired() bool { func (c *Client) LoginForMobile() string { var ctx context.Context ctxWithValues := context.WithValue(context.Background(), system.DeviceNameCtxKey, c.deviceName) + ctxWithValues = context.WithValue(ctxWithValues, system.OsNameCtxKey, c.osName) + ctxWithValues = context.WithValue(ctxWithValues, system.OsVersionCtxKey, c.osVersion) c.ctxCancelLock.Lock() defer c.ctxCancelLock.Unlock() ctx, c.ctxCancel = context.WithCancel(ctxWithValues)