diff options
| author | theimpostor <sahirhoda@gmail.com> | 2023-09-16 09:35:23 -0500 |
|---|---|---|
| committer | theimpostor <sahirhoda@gmail.com> | 2023-09-16 09:35:23 -0500 |
| commit | 47f55176197faed69f94c9aafb356302d7c0e420 (patch) | |
| tree | fdcf56df64a217c5d762b2628e7b33e9e7948b1c | |
| parent | a80ad1f8379059f496e34b833aedcbdd1ac3aa23 (diff) | |
Increase tty timeout
| -rw-r--r-- | main.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -164,7 +164,7 @@ func paste() error { ttyReader := bufio.NewReader(tty) buf := make([]byte, 0, 1024) - // time out intial read in 100 milliseconds + // time out intial read readChan := make(chan byte, 1) defer close(readChan) go func() { @@ -177,7 +177,7 @@ func paste() error { select { case b := <-readChan: buf = append(buf, b) - case <-time.After(100 * time.Millisecond): + case <-time.After(1 * time.Second): slog.Debug("tty read timeout") return nil, fmt.Errorf("tty read timeout") } |
