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.
1 parent 04aa323 commit 2dad0f0Copy full SHA for 2dad0f0
session.go
@@ -754,6 +754,14 @@ func (s *session) run() {
754
}
755
756
})
757
+
758
+ // Without this sleep the ticker will be aligned at the millisecond which
759
+ // corresponds to the creation of the session. If the session creation
760
+ // happened at 07:00:00.678 and the session StartTime is 07:30:00, any new
761
+ // connection received between 07:30:00.000 and 07:30:00.677 will be
762
+ // rejected. Aligning the ticker with a round second fixes that.
763
+ time.Sleep(time.Until(time.Now().Truncate(time.Second).Add(time.Second)))
764
765
ticker := time.NewTicker(time.Second)
766
767
defer func() {
0 commit comments