Skip to content

Commit 0f7b1ec

Browse files
authored
Merge pull request #334 from lightninglabs/cli-default-expiry
cmd/litcli: change default session expiry to 3 months
2 parents 6d560b4 + a37b563 commit 0f7b1ec

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cmd/litcli/sessions.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ import (
99
"github.com/urfave/cli"
1010
)
1111

12+
var (
13+
// defaultSessionExpiry is the default time a session can be used for.
14+
// The current value evaluates to 90 days.
15+
defaultSessionExpiry = time.Hour * 24 * 90
16+
)
17+
1218
var sessionCommands = []cli.Command{
1319
{
1420
Name: "sessions",
@@ -38,7 +44,7 @@ var addSessionCommand = cli.Command{
3844
Name: "expiry",
3945
Usage: "number of seconds that the session should " +
4046
"remain active",
41-
Value: uint64(time.Hour.Seconds()),
47+
Value: uint64(defaultSessionExpiry.Seconds()),
4248
},
4349
cli.StringFlag{
4450
Name: "mailboxserveraddr",

0 commit comments

Comments
 (0)