aboutsummaryrefslogtreecommitdiffstats
path: root/lib/agent/session.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-10-11 00:24:02 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-10-11 00:24:02 +0200
commit4695555e178bcabe54c5bf82117c9c4cef5440b5 (patch)
tree96a8721de74347450b2e4922004b1bf01e415dfa /lib/agent/session.go
parent882944a748d123c8715eca88536299d8570858f9 (diff)
Fixed Syncthing folder status events and exec command.
Diffstat (limited to 'lib/agent/session.go')
-rw-r--r--lib/agent/session.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/agent/session.go b/lib/agent/session.go
index e50abe1..06789d5 100644
--- a/lib/agent/session.go
+++ b/lib/agent/session.go
@@ -194,15 +194,13 @@ func (s *Sessions) refresh(sid string) {
}
func (s *Sessions) monitorSessMap() {
- const dbgFullTrace = false // for debugging
-
for {
select {
case <-s.stop:
s.Log.Debugln("Stop monitorSessMap")
return
case <-time.After(sessionMonitorTime * time.Second):
- if dbgFullTrace {
+ if s.LogLevelSilly {
s.Log.Debugf("Sessions Map size: %d", len(s.sessMap))
s.Log.Debugf("Sessions Map : %v", s.sessMap)
}
@@ -214,7 +212,9 @@ func (s *Sessions) monitorSessMap() {
s.mutex.Lock()
for _, ss := range s.sessMap {
if ss.expireAt.Sub(time.Now()) < 0 {
- //SEB DEBUG s.Log.Debugf("Delete expired session id: %s", ss.ID)
+ if s.LogLevelSilly {
+ s.Log.Debugf("Delete expired session id: %s", ss.ID)
+ }
delete(s.sessMap, ss.ID)
}
}