You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(manager): small refactors around the manager and token logic (#10)
* fix(manager): Improve channel closure handling
- Updated IsClosed function to accurately check if a channel is closed without consuming data unless necessary.
- Safely close the closedChan only if it is not already closed to avoid potential panics.
* fix(manager): Add panic recovery in token manager goroutine
- Implemented panic recovery in the Start method of entraidTokenManager to prevent crashes and ensure listener is notified of errors.
* fix(token): Enhance token creation logic and documentation
- Updated the New function to return nil if expiresOn is zero to prevent panic.
- Added logic to set receivedAt to the current time and recalculate TTL if receivedAt is zero.
- Improved documentation to clarify the responsibilities of the caller regarding token validity and behavior when parameters are zero.
* chore(token): remove some unnecessary comments
* test(manager): change test delta to 5ms
0 commit comments