tun2: loop forever at the foot of HandleConn
This commit is contained in:
parent
1827d19e84
commit
56fc4f89ba
|
@ -361,6 +361,7 @@ func (s *Server) HandleConn(c net.Conn, isKCP bool) {
|
||||||
ticker := time.NewTicker(5 * time.Second)
|
ticker := time.NewTicker(5 * time.Second)
|
||||||
defer ticker.Stop()
|
defer ticker.Stop()
|
||||||
|
|
||||||
|
for {
|
||||||
select {
|
select {
|
||||||
case <-ticker.C:
|
case <-ticker.C:
|
||||||
err := connection.Ping()
|
err := connection.Ping()
|
||||||
|
@ -409,6 +410,7 @@ func (s *Server) HandleConn(c net.Conn, isKCP bool) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (s *Server) RoundTrip(req *http.Request) (*http.Response, error) {
|
func (s *Server) RoundTrip(req *http.Request) (*http.Response, error) {
|
||||||
var conns []*Connection
|
var conns []*Connection
|
||||||
|
|
Loading…
Reference in New Issue