Skip to content

Commit

Permalink
Merge pull request #7 from Kazzz/support_newContext
Browse files Browse the repository at this point in the history
Fixed a problem where sess.mux caused panic with nil
  • Loading branch information
icza authored Apr 13, 2017
2 parents 41e2f53 + 3062b18 commit 2eda5d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gae_memcache_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ func (s *memcacheStore) Get(id string) Session {
return nil
}

// Yes! We have it! "Actualize" it.
sess.Access()
// Mutex is not marshaled, so create a new one:
// Yes! We have it!
// "Actualize" it, but first, Mutex is not marshaled, so create a new one:
sess.mux = &sync.RWMutex{}
sess.Access()
s.sessions[id] = sess
return sess
}
Expand Down

0 comments on commit 2eda5d1

Please sign in to comment.