After my program is running for about 20 minutes the application crashes with the following error:
System.Exception: Access token corrupted
at RingCentral.Subscription.SubscriptionServiceImplementation.Renew()
at RingCentral.Subscription.SubscriptionServiceImplementation.OnTimedExpired(Object source)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.TimerQueueTimer.CallCallback()
at System.Threading.TimerQueueTimer.Fire()
at System.Threading.TimerQueue.FireNextTimers()
This is my code:
Dim subscription = New SubscriptionServiceImplementation With {._platform = ringCentral}
subscription.AddEvent("/restapi/v1.0/account/~/extension/~/presence?detailedTelephonyState=true")
Dim responsePub = subscription.Subscribe(AddressOf ActionOnUser, AddressOf ActionOnConnect, AddressOf ActionOnError)