Ensure session wide variables are available on a live query context

This commit is contained in:
Tobie Morgan Hitchcock 2018-04-19 13:36:08 +01:00
parent 4d155c61ce
commit c4f8448345

View file

@ -55,7 +55,10 @@ func (s *socket) ctx(ns, db string) (ctx context.Context) {
ctx = context.WithValue(ctx, ctxKeyNs, ns)
ctx = context.WithValue(ctx, ctxKeyDb, db)
auth := s.fibre.Get(varKeyAuth).(*cnf.Auth)
keep := s.fibre.Get(ctxKeyKeep)
ctx = context.WithValue(ctx, ctxKeyKeep, keep)
auth := s.fibre.Get(ctxKeyAuth).(*cnf.Auth)
ctx = context.WithValue(ctx, ctxKeyAuth, auth.Data)
ctx = context.WithValue(ctx, ctxKeyKind, auth.Kind)