aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--http.go2
-rw-r--r--ssh.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/http.go b/http.go
index cf665b4..6abac6d 100644
--- a/http.go
+++ b/http.go
@@ -33,8 +33,8 @@ func httpHandler(conn net.Conn, delay time.Duration) {
eof := make(chan empty)
go func() {
+ close(eof)
io.Copy(ioutil.Discard, conn)
- eof <- empty{}
}()
tick := time.Tick(delay)
diff --git a/ssh.go b/ssh.go
index 909dc13..cced23e 100644
--- a/ssh.go
+++ b/ssh.go
@@ -12,8 +12,8 @@ import (
func sshHandler(conn net.Conn, delay time.Duration) {
eof := make(chan empty)
go func() {
+ defer close(eof)
io.Copy(ioutil.Discard, conn)
- eof <- empty{}
}()
tick := time.Tick(delay)