Commit b473f6f2 authored by AlexStocks's avatar AlexStocks

use ContextValues's flag

parent d338d5bd
......@@ -274,10 +274,14 @@ func (s *session) SetWaitTime(waitTime time.Duration) {
// set attribute of key @session:key
func (s *session) GetAttribute(key interface{}) interface{} {
var ret interface{}
s.lock.RLock()
ret = s.attrs.Get(key)
ret, flag := s.attrs.Get(key)
s.lock.RUnlock()
if !flag {
return nil
}
return ret
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment