diff --git a/.dockerignore b/.dockerignore index 23f02a2..63bc77e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,8 +1,8 @@ /.git/ /.github/ /.gitignore -/deploy/ !/deploy/pubkeys/.gitkeep +/deploy/ /dist/ /sish /.vscode/ \ No newline at end of file diff --git a/cmd/sish.go b/cmd/sish.go index cb06995..bef6e1a 100644 --- a/cmd/sish.go +++ b/cmd/sish.go @@ -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() { diff --git a/sshmuxer/sshmuxer.go b/sshmuxer/sshmuxer.go index c4acde0..951517c 100644 --- a/sshmuxer/sshmuxer.go +++ b/sshmuxer/sshmuxer.go @@ -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() }