Skip to content

Commit

Permalink
Merge pull request #46 from aliiohs/exposeMaxWheelTimeSpan
Browse files Browse the repository at this point in the history
Fix:ExposeMaxWheelTimeSpan
  • Loading branch information
watermelo authored Aug 13, 2020
2 parents fb33e07 + f9c6e8b commit 957f65f
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@ import (
)

const (
maxReadBufLen = 4 * 1024
netIOTimeout = 1e9 // 1s
period = 60 * 1e9 // 1 minute
pendingDuration = 3e9
defaultQLen = 1024
maxIovecNum = 10
maxWheelTimeSpan = 900e9 // 900s, 15 minute
maxReadBufLen = 4 * 1024
netIOTimeout = 1e9 // 1s
period = 60 * 1e9 // 1 minute
pendingDuration = 3e9
defaultQLen = 1024
maxIovecNum = 10
//MaxWheelTimeSpan 900s, 15 minute
MaxWheelTimeSpan = 900e9

defaultSessionName = "session"
defaultTCPSessionName = "tcp-session"
Expand All @@ -65,7 +66,7 @@ var (

func init() {
span := 100e6 // 100ms
buckets := maxWheelTimeSpan / span
buckets := MaxWheelTimeSpan / span
wheel = gxtime.NewWheel(time.Duration(span), int(buckets)) // wheel longest span is 15 minute
}

Expand Down

0 comments on commit 957f65f

Please sign in to comment.