tun2: goroutine it up fam
This commit is contained in:
parent
7cf2a9a616
commit
d25fe6c7e7
|
@ -159,6 +159,7 @@ func (s *Server) ListenAndServe() error {
|
||||||
s.connlock.Lock()
|
s.connlock.Lock()
|
||||||
|
|
||||||
for _, c := range s.conns {
|
for _, c := range s.conns {
|
||||||
|
go func() {
|
||||||
req, err := http.NewRequest("GET", "http://backend/health", nil)
|
req, err := http.NewRequest("GET", "http://backend/health", nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
@ -193,6 +194,7 @@ func (s *Server) ListenAndServe() error {
|
||||||
ln.Log(ln.F{
|
ln.Log(ln.F{
|
||||||
"action": "ping_health_is_good",
|
"action": "ping_health_is_good",
|
||||||
}, c.F())
|
}, c.F())
|
||||||
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
s.connlock.Unlock()
|
s.connlock.Unlock()
|
||||||
|
|
Loading…
Reference in New Issue