summaryrefslogtreecommitdiffstats
path: root/lib/agent/agent.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/agent/agent.go')
-rw-r--r--lib/agent/agent.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/agent/agent.go b/lib/agent/agent.go
index a562e77..989c9a0 100644
--- a/lib/agent/agent.go
+++ b/lib/agent/agent.go
@@ -132,6 +132,9 @@ func (ctx *Context) Run() (int, error) {
ctx._logPrint("Logging file for HTTP requests: %s\n", logFileHTTPReq)
}
+ // Create events management
+ ctx.events = NewEvents(ctx)
+
// Create syncthing instance when section "syncthing" is present in agent-config.json
if ctx.Config.FileConf.SThgConf != nil {
ctx.SThg = st.NewSyncThing(ctx.Config, ctx.Log)
@@ -186,9 +189,6 @@ func (ctx *Context) Run() (int, error) {
// Sessions manager
ctx.sessions = NewClientSessions(ctx, cookieMaxAge)
- // Create events management
- ctx.events = NewEvents(ctx)
-
// Create projects management
ctx.projects = NewProjects(ctx, ctx.SThg)