Add events on session activation and connection authz/close (#2215)
* Add events on session activation and connection authz/close * Only send success event on actual success
This commit is contained in:
1 parent
c31b8a4383
commit
f5bf3b2c0c
3 files changed
+21
-11
No files matched your search
@@ -194,6 +194,7 @@ func (w *Worker) handleProxy(listenerCfg *listenerutil.ListenerConfig) (http.Han
|
||||
}
|
||||
return
|
||||
}
|
||||
event.WriteSysEvent(ctx, op, "session successfully activated", "session_id", sessionId)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,7 +235,12 @@ func (w *Worker) handleProxy(listenerCfg *listenerutil.ListenerConfig) (http.Han
|
||||
}
|
||||
return
|
||||
}
|
||||
defer session.CloseConnections(ctx, sessClient, w.sessionInfoMap, map[string]string{ci.Id: si.Id})
|
||||
event.WriteSysEvent(ctx, op, "connection successfully authorized", "session_id", sessionId, "connection_id", ci.Id)
|
||||
defer func() {
|
||||
if session.CloseConnections(ctx, sessClient, w.sessionInfoMap, map[string]string{ci.Id: si.Id}) {
|
||||
event.WriteSysEvent(ctx, op, "connection closed", "session_id", sessionId, "connection_id", ci.Id)
|
||||
}
|
||||
}()
|
||||
|
||||
si.Lock()
|
||||
ci.ConnCtx = connCtx
|
||||
|
||||
Reference in new issue
Block a user