aboutsummaryrefslogtreecommitdiff
path: root/ssh.go
diff options
context:
space:
mode:
Diffstat (limited to 'ssh.go')
-rw-r--r--ssh.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/ssh.go b/ssh.go
index 3d43a6c..909dc13 100644
--- a/ssh.go
+++ b/ssh.go
@@ -9,16 +9,14 @@ import (
"time"
)
-type empty struct{}
-
-func sshHandler(conn net.Conn) {
+func sshHandler(conn net.Conn, delay time.Duration) {
eof := make(chan empty)
go func() {
io.Copy(ioutil.Discard, conn)
eof <- empty{}
}()
- tick := time.Tick(10 * time.Second)
+ tick := time.Tick(delay)
for {
select {
case <-eof: