From 89832c1a95353559f42c27e4f843358d7a4ae098 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Thu, 21 Apr 2022 14:13:42 -0700 Subject: [PATCH] tailcfg: fix typo in SessionDuration field name Noted by @danderson. Updates #3802 Change-Id: Ide15f3f28e30f6abb5c94d7dcd218bd9482752a0 Signed-off-by: Brad Fitzpatrick --- ssh/tailssh/tailssh.go | 6 +++--- tailcfg/tailcfg.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ssh/tailssh/tailssh.go b/ssh/tailssh/tailssh.go index 0f485756a..270f714f1 100644 --- a/ssh/tailssh/tailssh.go +++ b/ssh/tailssh/tailssh.go @@ -797,10 +797,10 @@ func (ss *sshSession) run() { defer ss.ctx.CloseWithError(errSessionDone) - if ss.action.SesssionDuration != 0 { - t := time.AfterFunc(ss.action.SesssionDuration, func() { + if ss.action.SessionDuration != 0 { + t := time.AfterFunc(ss.action.SessionDuration, func() { ss.ctx.CloseWithError(userVisibleError{ - fmt.Sprintf("Session timeout of %v elapsed.", ss.action.SesssionDuration), + fmt.Sprintf("Session timeout of %v elapsed.", ss.action.SessionDuration), context.DeadlineExceeded, }) }) diff --git a/tailcfg/tailcfg.go b/tailcfg/tailcfg.go index dfe8d7b28..8c54c7ab8 100644 --- a/tailcfg/tailcfg.go +++ b/tailcfg/tailcfg.go @@ -1730,9 +1730,9 @@ type SSHAction struct { // without further prompts. Accept bool `json:"accept,omitempty"` - // SesssionDuration, if non-zero, is how long the session can stay open + // SessionDuration, if non-zero, is how long the session can stay open // before being forcefully terminated. - SesssionDuration time.Duration `json:"sessionDuration,omitempty"` + SessionDuration time.Duration `json:"sessionDuration,omitempty"` // AllowAgentForwarding, if true, allows accepted connections to forward // the ssh agent if requested.