don't wait forever
This commit is contained in:
parent
d25fe6c7e7
commit
a1df9e32ec
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue