don't wait forever

This commit is contained in:
Cadey Ratio 2017-03-26 16:13:20 -07:00
parent d25fe6c7e7
commit a1df9e32ec
1 changed files with 1 additions and 2 deletions

View File

@ -7,7 +7,6 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"io/ioutil"
"math/rand" "math/rand"
"net" "net"
"net/http" "net/http"
@ -183,7 +182,7 @@ func (s *Server) ListenAndServe() error {
c.cancel() c.cancel()
} }
_, err = ioutil.ReadAll(stream) _, err = stream.Read(make([]byte, 3000))
if err != nil { if err != nil {
ln.Error(err) ln.Error(err)
c.cancel() c.cancel()