summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortheimpostor <sahirhoda@gmail.com>2023-09-16 09:35:23 -0500
committertheimpostor <sahirhoda@gmail.com>2023-09-16 09:35:23 -0500
commit47f55176197faed69f94c9aafb356302d7c0e420 (patch)
treefdcf56df64a217c5d762b2628e7b33e9e7948b1c
parenta80ad1f8379059f496e34b833aedcbdd1ac3aa23 (diff)
Increase tty timeout
-rw-r--r--main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.go b/main.go
index 25d2e75..9243273 100644
--- a/main.go
+++ b/main.go
@@ -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")
}