We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c83230c + 2dad0f0 commit 3e41031Copy full SHA for 3e41031
session.go
@@ -758,6 +758,14 @@ func (s *session) run() {
758
}
759
760
})
761
+
762
+ // Without this sleep the ticker will be aligned at the millisecond which
763
+ // corresponds to the creation of the session. If the session creation
764
+ // happened at 07:00:00.678 and the session StartTime is 07:30:00, any new
765
+ // connection received between 07:30:00.000 and 07:30:00.677 will be
766
+ // rejected. Aligning the ticker with a round second fixes that.
767
+ time.Sleep(time.Until(time.Now().Truncate(time.Second).Add(time.Second)))
768
769
ticker := time.NewTicker(time.Second)
770
771
defer func() {
0 commit comments