File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Sources/Instrumentation/Sessions Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -31,13 +31,13 @@ public class SessionManager {
3131 if let session,
3232 !session. isExpired ( ) {
3333 // extend session
34- let extendedSession = refreshSession ( session: session)
34+ let extendedSession = locked_refreshSession ( session: session)
3535 self . session = extendedSession
3636 return ( extendedSession, nil as Session ? , false )
3737 } else {
3838 // start new session
3939 let prev = session
40- let nextSession = startSession ( )
40+ let nextSession = locked_startSession ( )
4141 self . session = nextSession
4242 return ( nextSession, prev, true )
4343 }
@@ -64,7 +64,7 @@ public class SessionManager {
6464
6565 /// Creates a new session with a unique identifier
6666 /// *Warning* - this must be a pure function since it is used inside a lock
67- private func startSession ( ) -> Session {
67+ private func locked_startSession ( ) -> Session {
6868 let now = Date ( )
6969
7070 return Session (
@@ -78,7 +78,7 @@ public class SessionManager {
7878
7979 /// Extends the current session expiry time
8080 /// *Warning* - this must be a pure function since it is used inside a lock
81- private func refreshSession ( session: Session ) -> Session {
81+ private func locked_refreshSession ( session: Session ) -> Session {
8282 return Session (
8383 id: session. id,
8484 expireTime: Date ( timeIntervalSinceNow: Double ( configuration. sessionTimeout) ) ,
You can’t perform that action at this time.
0 commit comments