Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Commit ee33bbe

Browse files
committed
server: fix channel and loop variable
1 parent 76251f0 commit ee33bbe

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

server/server.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ func New(cfg config.Config) (*Server, error) {
131131
hrt: hrt,
132132
mon: mon,
133133
api: apiServer,
134+
killc: make(chan struct{}),
134135
stopc: nil,
135136
engineReconcileInterval: eIval,
136137
}
@@ -183,6 +184,7 @@ func (s *Server) Run() {
183184
func() { s.usGen.Run(beatc, s.stopc) },
184185
func() { s.usPub.Run(beatc, s.stopc) },
185186
} {
187+
f := f
186188
s.wg.Add(1)
187189
go func() {
188190
f()

0 commit comments

Comments
 (0)