Preserve original expiry when refreshing token (#4580)
To avoid shortening the token expiration time during refreshing cause client reconnect failed after network down for a long time (>5min).
This commit is contained in:
@@ -182,6 +182,7 @@ type ParticipantParams struct {
|
||||
ReporterResolver roomobs.ParticipantReporterResolver
|
||||
SimTracks map[uint32]interceptor.SimulcastTrackInfo
|
||||
Grants *auth.ClaimGrants
|
||||
TokenExpiresAt time.Time
|
||||
InitialVersion uint32
|
||||
ClientConf *livekit.ClientConfiguration
|
||||
ClientInfo ClientInfo
|
||||
@@ -781,6 +782,10 @@ func (p *ParticipantImpl) ClaimGrants() *auth.ClaimGrants {
|
||||
return p.grants.Load()
|
||||
}
|
||||
|
||||
func (p *ParticipantImpl) TokenExpiresAt() time.Time {
|
||||
return p.params.TokenExpiresAt
|
||||
}
|
||||
|
||||
func (p *ParticipantImpl) SetPermission(permission *livekit.ParticipantPermission) bool {
|
||||
if permission == nil {
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user