Skip to content

Commit

Permalink
fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
rsafonseca authored and felipejfc committed Jul 25, 2023
1 parent f9976cd commit e3ef17b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ func (s *sessionImpl) Bind(ctx context.Context, uid string) error {
// if code running on frontend server
if s.IsFrontend {
// If a session with the same UID already exists in this frontend server, close it
if val, ok := sessionsByUID.Load(uid); ok {
if val, ok := s.pool.sessionsByUID.Load(uid); ok {
val.(Session).Close()
}
s.pool.sessionsByUID.Store(uid, s)
Expand Down Expand Up @@ -485,7 +485,7 @@ func (s *sessionImpl) Close() {
s.pool.sessionsByID.Delete(s.ID())
// Only remove session by UID if the session ID matches the one being closed. This avoids problems with removing a valid session after the user has already reconnected before this session's heartbeat times out
if val, ok := s.pool.sessionsByUID.Load(s.UID()); ok {
if (val.(Session)).id == s.ID() {
if (val.(Session)).ID() == s.ID() {
s.pool.sessionsByUID.Delete(s.UID())
}
}
Expand Down

0 comments on commit e3ef17b

Please sign in to comment.