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"
"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()