tun2: continue sooner in pingloop

This commit is contained in:
Cadey Ratio 2017-03-26 16:19:00 -07:00
parent 10f51ef10a
commit ed00bc4232
1 changed files with 3 additions and 2 deletions

View File

@ -166,21 +166,22 @@ func (s *Server) ListenAndServe() error {
stream, err := c.session.OpenStream()
if err != nil {
ln.Error(err, c.F())
c.cancel()
continue
}
err = req.Write(stream)
if err != nil {
ln.Error(err, c.F())
c.cancel()
continue
}
_, err = stream.Read(make([]byte, 30))
if err != nil {
ln.Error(err, c.F())
c.cancel()
continue
}
stream.Close()