mirror of
https://github.com/yudai/gotty.git
synced 2026-01-05 17:18:50 +01:00
Support auto reconnection
A new option `--auto-reconnect` which takes seconds to reconnect is added.
This commit is contained in:
parent
4df9ac8059
commit
acacba6f03
6 changed files with 97 additions and 55 deletions
7
main.go
7
main.go
|
|
@ -55,6 +55,12 @@ func main() {
|
|||
Usage: "Title format of browser window",
|
||||
EnvVar: "GOTTY_TITLE_FORMAT",
|
||||
},
|
||||
cli.IntFlag{
|
||||
Name: "auto-reconnect",
|
||||
Value: -1,
|
||||
Usage: "Seconds to automatically reconnect to the server when the connection is closed (default: disabled)",
|
||||
EnvVar: "GOTTY_AUTO_RECONNECT",
|
||||
},
|
||||
}
|
||||
cmd.Action = func(c *cli.Context) {
|
||||
if len(c.Args()) == 0 {
|
||||
|
|
@ -72,6 +78,7 @@ func main() {
|
|||
c.Bool("random-url"),
|
||||
c.String("profile-file"),
|
||||
c.String("title-format"),
|
||||
c.Int("auto-reconnect"),
|
||||
c.Args(),
|
||||
},
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue