From a1df9e32ec063c7ab35e6d649e55e9f42dd5837e Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sun, 26 Mar 2017 16:13:20 -0700 Subject: [PATCH] don't wait forever --- lib/tun2/server.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/tun2/server.go b/lib/tun2/server.go index 8e0b467..0e04143 100644 --- a/lib/tun2/server.go +++ b/lib/tun2/server.go @@ -7,7 +7,6 @@ import ( "encoding/json" "errors" "fmt" - "io/ioutil" "math/rand" "net" "net/http" @@ -183,7 +182,7 @@ func (s *Server) ListenAndServe() error { c.cancel() } - _, err = ioutil.ReadAll(stream) + _, err = stream.Read(make([]byte, 3000)) if err != nil { ln.Error(err) c.cancel()