Skip to content

Commit

Permalink
Readd customizable timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniomika committed May 2, 2020
1 parent 00fbac4 commit 6e70b2a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/.git/
/.github/
/.gitignore
/deploy/
!/deploy/pubkeys/.gitkeep
/deploy/
/dist/
/sish
/.vscode/
1 change: 1 addition & 0 deletions cmd/sish.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ func init() {

rootCmd.PersistentFlags().DurationP("connection-idle-timeout", "", 5*time.Second, "Number of seconds to wait for activity before closing a connection")
rootCmd.PersistentFlags().DurationP("ping-client-interval", "", 5*time.Second, "Interval in seconds to ping a client to ensure it is up.")
rootCmd.PersistentFlags().DurationP("cleanup-unbound-timeout", "", 5*time.Second, "Interval in seconds to wait before cleaning up an unbound connection.")
}

func initConfig() {
Expand Down
2 changes: 1 addition & 1 deletion sshmuxer/sshmuxer.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func Start() {

if viper.GetBool("cleanup-unbound") {
go func() {
<-time.After(5 * time.Second)
<-time.After(viper.GetDuration("cleanup-unbound-timeout"))
if !clientLoggedIn {
conn.Close()
}
Expand Down

0 comments on commit 6e70b2a

Please sign in to comment.