mirror of
https://github.com/openziti/ziti.git
synced 2026-10-13 07:41:17 +00:00
Merge pull request #1598 from openziti/fix-api-session-caching
Put api session into tunnel state after looking up from cache. Fixes #1597
This commit is contained in:
@@ -139,6 +139,7 @@ func (self *baseTunnelRequestContext) ensureApiSessionLocking(configTypes []stri
|
||||
if _, _, err := self.handler.getAppEnv().GetManagers().ApiSession.MarkLastActivityByTokens(self.apiSession.Token); err != nil {
|
||||
logger.WithError(err).Error("unexpected error while marking api session activity")
|
||||
}
|
||||
state.setCurrentApiSessionId(apiSession.Id)
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,8 +239,9 @@ func (self *fabricProvider) TunnelService(service tunnel.Service, terminatorInst
|
||||
}
|
||||
|
||||
if response.ApiSession != nil {
|
||||
log.WithField("apiSessionId", response.ApiSession.SessionId).Info("received new apiSession")
|
||||
self.updateApiSession(ctrlCh.Id(), response.ApiSession)
|
||||
if self.updateApiSession(ctrlCh.Id(), response.ApiSession) {
|
||||
log.WithField("apiSessionId", response.ApiSession.SessionId).Info("received new apiSession")
|
||||
}
|
||||
}
|
||||
|
||||
if response.Session != nil && response.Session.SessionId != sessionId {
|
||||
|
||||
Reference in New Issue
Block a user